1 /* These must go first. Some set explicit values. */
2 #define ALTERNATE(name, val) T(_CXX, T_##name, #name, val)
3 #define PUNCTUATOR(name, string, val) T(_ALL, T_##name, string, val)
4 #include "tokens_punctuator.inc"
8 #define S(name, description) T(_ALL, T_##name, description,)
10 S(IDENTIFIER, "identifier")
11 S(NUMBER, "number constant")
12 S(CHARACTER_CONSTANT, "character constant")
13 S(STRING_LITERAL, "string literal")
14 S(HEADERNAME, "headername")
15 S(MACRO_PARAMETER, "macro parameter")
16 S(UNKNOWN_CHAR, "unknown character")
19 #define S(mode,x) T(mode,T_##x,#x,)
68 S(_CXX, reinterpret_cast)
83 S(_ALL, __extension__)
84 S(_ALL, __builtin_classify_type)
85 S(_ALL, __builtin_va_list)
86 S(_ALL, __builtin_va_arg)
87 S(_ALL, __builtin_va_copy)
88 S(_ALL, __builtin_offsetof)
89 S(_ALL, __builtin_constant_p)
90 S(_ALL, __builtin_types_compatible_p)
91 S(_ALL, __builtin_isgreater)
92 S(_ALL, __builtin_isgreaterequal)
93 S(_ALL, __builtin_isless)
94 S(_ALL, __builtin_islessequal)
95 S(_ALL, __builtin_islessgreater)
96 S(_ALL, __builtin_isunordered)
97 S(_ALL, __PRETTY_FUNCTION__)
100 S(_MS, __FUNCDNAME__)
103 #define S(mode, x, val) T(mode, T_##x, #x, val)
105 S(_ALL, __FUNCTION__, = T___func__)
107 S(_ALL, __signed, = T_signed)
108 S(_ALL, __signed__, = T_signed)
109 S(_C99|_GNUC, _Complex, )
110 S(_ALL, __complex__, = T__Complex)
111 S(_ALL, __complex, = T__Complex)
112 S(_C99|_GNUC, _Imaginary, )
114 S(_ALL, __real, = T___real__)
116 S(_ALL, __imag, = T___imag__)
117 S(_ALL, __alignof__, )
118 S(_ALL, __alignof, = T___alignof__)
119 S(_MS, _alignof, = T___alignof__)
121 S(_ALL, __const, = T_const)
122 S(_ALL, __const__, = T_const)
124 S(_ALL, __restrict__, = T_restrict)
125 S(_ALL, __restrict, = T_restrict)
126 S(_MS, _restrict, = T_restrict)
128 S(_ALL, __asm__, = T_asm)
129 S(_MS, _asm, = T_asm)
130 S(_ALL, __asm, = T_asm)
132 S(_ALL, __volatile, = T_volatile)
133 S(_ALL, __volatile__, = T_volatile)
134 S(_C99|_CXX|_GNUC, inline, )
135 S(_ALL, __inline, = T_inline)
136 S(_ALL, __inline__, = T_inline)
138 S(_ALL, __typeof, = T_typeof)
139 S(_ALL, __typeof__, = T_typeof)
140 S(_ALL, __attribute__, )
142 S(_ALL, __builtin_va_start, )
143 S(_ALL, __builtin_stdarg_start, = T___builtin_va_start)
146 S(_MS, __near, = T__near)
148 S(_MS, __far, = T__far)
150 S(_MS, _cdecl, = T_cdecl)
151 S(_MS, __cdecl, = T_cdecl)
153 S(_MS, __stdcall, = T__stdcall)
155 S(_MS, __fastcall, = T__fastcall)
157 S(_MS, _forceinline, )
158 S(_MS, __forceinline, = T__forceinline)
159 S(_MS, __unaligned, )
161 S(_MS, __assume, = T__assume)
163 S(_MS, __try, = T__try)
165 S(_MS, __finally, = T__finally)
167 S(_MS, __leave, = T__leave)
169 S(_MS, __except, = T__except)
171 S(_MS, __declspec, = T__declspec)
173 S(_MS, __based, = T__based)
181 S(_MS, __w64, = T__w64)
184 S(_MS, __int8, = T__int8)
186 S(_MS, __int16, = T__int16)
188 S(_MS, __int32, = T__int32)
190 S(_MS, __int64, = T__int64)
192 S(_MS, __int128, = T__int128)
195 /* Redefine required macros for MinGW headers */
196 #if defined(__MINGW32__) || defined(__CYGWIN__)
197 #define __stdcall __attribute__((__stdcall__))
198 #define __fastcall __attribute__((__fastcall__))
199 #define __cdecl __attribute__((__cdecl__))