5 /* These must go first. Some set explicit values. */
6 #define ALTERNATE(name, val) T(_CXX, T_##name, #name, val)
7 #define PUNCTUATOR(name, string, val) T(_ALL, T_##name, string, val)
8 #include "tokens_punctuator.inc"
12 #define S(name, description) TS(T_##name, description,)
13 S(EOF, "end of input")
14 S(IDENTIFIER, "identifier")
15 S(NUMBER, "number constant")
16 S(CHARACTER_CONSTANT, "character constant")
17 S(STRING_LITERAL, "string literal")
18 S(HEADERNAME, "headername")
19 S(MACRO_PARAMETER, "macro parameter")
20 S(UNKNOWN_CHAR, "unknown character")
23 #define S(mode,x) T(mode,T_##x,#x,)
72 S(_CXX, reinterpret_cast)
87 S(_ALL, __extension__)
88 S(_ALL, __builtin_classify_type)
89 S(_ALL, __builtin_va_list)
90 S(_ALL, __builtin_va_arg)
91 S(_ALL, __builtin_va_copy)
92 S(_ALL, __builtin_offsetof)
93 S(_ALL, __builtin_constant_p)
94 S(_ALL, __builtin_types_compatible_p)
95 S(_ALL, __builtin_isgreater)
96 S(_ALL, __builtin_isgreaterequal)
97 S(_ALL, __builtin_isless)
98 S(_ALL, __builtin_islessequal)
99 S(_ALL, __builtin_islessgreater)
100 S(_ALL, __builtin_isunordered)
101 S(_ALL, __PRETTY_FUNCTION__)
104 S(_MS, __FUNCDNAME__)
107 #define S(mode, x, val) T(mode, T_##x, #x, val)
109 S(_ALL, __FUNCTION__, = T___func__)
111 S(_ALL, __signed, = T_signed)
112 S(_ALL, __signed__, = T_signed)
113 S(_C99|_GNUC, _Complex, )
114 S(_ALL, __complex__, = T__Complex)
115 S(_ALL, __complex, = T__Complex)
116 S(_C99|_GNUC, _Imaginary, )
118 S(_ALL, __real, = T___real__)
120 S(_ALL, __imag, = T___imag__)
121 S(_ALL, __alignof__, )
122 S(_ALL, __alignof, = T___alignof__)
123 S(_MS, _alignof, = T___alignof__)
125 S(_ALL, __const, = T_const)
126 S(_ALL, __const__, = T_const)
128 S(_ALL, __restrict__, = T_restrict)
129 S(_ALL, __restrict, = T_restrict)
130 S(_MS, _restrict, = T_restrict)
132 S(_ALL, __asm__, = T_asm)
133 S(_MS, _asm, = T_asm)
134 S(_ALL, __asm, = T_asm)
136 S(_ALL, __volatile, = T_volatile)
137 S(_ALL, __volatile__, = T_volatile)
138 S(_C99|_CXX|_GNUC, inline, )
139 S(_ALL, __inline, = T_inline)
140 S(_ALL, __inline__, = T_inline)
142 S(_ALL, __typeof, = T_typeof)
143 S(_ALL, __typeof__, = T_typeof)
144 S(_ALL, __attribute__, )
146 S(_ALL, __builtin_va_start, )
147 S(_ALL, __builtin_stdarg_start, = T___builtin_va_start)
150 S(_MS, __near, = T__near)
152 S(_MS, __far, = T__far)
154 S(_MS, _cdecl, = T_cdecl)
155 S(_MS, __cdecl, = T_cdecl)
157 S(_MS, __stdcall, = T__stdcall)
159 S(_MS, __fastcall, = T__fastcall)
161 S(_MS, _forceinline, )
162 S(_MS, __forceinline, = T__forceinline)
163 S(_MS, __unaligned, )
165 S(_MS, __assume, = T__assume)
167 S(_MS, __try, = T__try)
169 S(_MS, __finally, = T__finally)
171 S(_MS, __leave, = T__leave)
173 S(_MS, __except, = T__except)
175 S(_MS, __declspec, = T__declspec)
177 S(_MS, __based, = T__based)
185 S(_MS, __w64, = T__w64)
188 S(_MS, __int8, = T__int8)
190 S(_MS, __int16, = T__int16)
192 S(_MS, __int32, = T__int32)
194 S(_MS, __int64, = T__int64)
196 S(_MS, __int128, = T__int128)
199 /* Redefine required macros for MinGW headers */
200 #if defined(__MINGW32__) || defined(__CYGWIN__)
201 #define __stdcall __attribute__((__stdcall__))
202 #define __fastcall __attribute__((__fastcall__))
203 #define __cdecl __attribute__((__cdecl__))