Changeset ed9a1ae for src/SynTree
- Timestamp:
- Aug 31, 2022, 10:57:37 AM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 64af7ac
- Parents:
- dc708c1
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Type.cc
rdc708c1 red9a1ae 80 80 // These must remain in the same order as the corresponding bit fields. 81 81 const char * Type::FuncSpecifiersNames[] = { "inline", "_Noreturn", "fortran" }; 82 const char * Type::StorageClassesNames[] = { "extern", "static", "auto", "register", "_ Thread_local" };82 const char * Type::StorageClassesNames[] = { "extern", "static", "auto", "register", "__thread", "_Thread_local" }; 83 83 const char * Type::QualifiersNames[] = { "const", "restrict", "volatile", "mutex", "_Atomic" }; 84 84 -
src/SynTree/Type.h
rdc708c1 red9a1ae 84 84 }; // FuncSpecifiers 85 85 86 enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, NumStorageClass = 5};86 enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, ThreadlocalGcc = 1 << 4, ThreadlocalC11 = 1 << 5, NumStorageClass = 6 }; 87 87 static const char * StorageClassesNames[]; 88 88 union StorageClasses { … … 93 93 bool is_auto : 1; 94 94 bool is_register : 1; 95 bool is_threadlocal : 1; 95 bool is_threadlocalGcc : 1; 96 bool is_threadlocalC11 : 1; 96 97 }; 97 98 … … 100 101 // equality (==, !=) works implicitly on first field "val", relational operations are undefined. 101 102 BFCommon( StorageClasses, NumStorageClass ) 103 104 bool is_threadlocal_any() { return this->is_threadlocalC11 || this->is_threadlocalGcc; } 102 105 }; // StorageClasses 103 106
Note:
See TracChangeset
for help on using the changeset viewer.