5 /* These must go first. Some set explicit values. */
6 #define ALTERNATE(name, val) T(_CXX, name, #name, val)
7 #define PUNCTUATOR(name, string, val) T(_ALL, name, string, val)
8 #include "tokens_punctuator.inc"
12 TS(IDENTIFIER, "identifier",)
13 TS(INTEGER, "integer number",)
14 TS(FLOATINGPOINT, "floatingpoint number",)
15 TS(CHARACTER_CONSTANT, "character constant",)
16 TS(WIDE_CHARACTER_CONSTANT, "wide character constant",)
17 TS(STRING_LITERAL, "string literal",)
18 TS(WIDE_STRING_LITERAL, "wide string literal",)
20 #define S(mode,x) T(mode,x,#x,)
73 S(_CXX, reinterpret_cast)
90 S(_ALL, __extension__)
91 S(_ALL, __builtin_classify_type)
92 S(_ALL, __builtin_va_list)
93 S(_ALL, __builtin_va_arg)
94 S(_ALL, __builtin_va_copy)
95 S(_ALL, __builtin_offsetof)
96 S(_ALL, __builtin_constant_p)
97 S(_ALL, __builtin_types_compatible_p)
98 S(_ALL, __builtin_isgreater)
99 S(_ALL, __builtin_isgreaterequal)
100 S(_ALL, __builtin_isless)
101 S(_ALL, __builtin_islessequal)
102 S(_ALL, __builtin_islessgreater)
103 S(_ALL, __builtin_isunordered)
104 S(_ALL, __PRETTY_FUNCTION__)
105 S(_ALL, __FUNCTION__)
109 S(_MS, __FUNCDNAME__)
112 /* needed on Windows */
117 /* needed on MinGW */
123 /* needed on MinGW and Cygwin */
128 /* needed on Darwin... */
134 #define S(mode, x, val) T(mode, x, #x, val)
135 S(_ANSI|_C99|_CXX, signed, )
136 S(_ALL, __signed, = T_signed)
137 S(_ALL, __signed__, = T_signed)
138 S(_C99|_GNUC, _Complex, )
139 S(_ALL, __complex__, = T__Complex)
140 S(_ALL, __complex, = T__Complex)
141 S(_C99|_GNUC, _Imaginary, )
143 S(_ALL, __real, = T___real__)
145 S(_ALL, __imag, = T___imag__)
146 S(_ALL, __alignof__, )
147 S(_ALL, __alignof, = T___alignof__)
148 S(_MS, _alignof, = T___alignof__)
149 S(_ANSI|_C99|_CXX, const, )
150 S(_ALL, __const, = T_const)
151 S(_ALL, __const__, = T_const)
153 S(_ALL, __restrict__, = T_restrict)
154 S(_ALL, __restrict, = T_restrict)
155 S(_MS, _restrict, = T_restrict)
157 S(_ALL, __asm__, = T_asm)
158 S(_MS, _asm, = T_asm)
159 S(_ALL, __asm, = T_asm)
160 S(_ANSI|_C99|_CXX, volatile, )
161 S(_ALL, __volatile, = T_volatile)
162 S(_ALL, __volatile__, = T_volatile)
163 S(_C99|_CXX|_GNUC, inline, )
164 S(_ALL, __inline, = T_inline)
165 S(_ALL, __inline__, = T_inline)
167 S(_ALL, __typeof, = T_typeof)
168 S(_ALL, __typeof__, = T_typeof)
169 S(_ALL, __attribute__, )
171 S(_ALL, __builtin_va_start, )
172 S(_ALL, __builtin_stdarg_start, = T___builtin_va_start)
175 S(_MS, __near, = T__near)
177 S(_MS, __far, = T__far)
179 S(_MS, _cdecl, = T_cdecl)
180 S(_MS, __cdecl, = T_cdecl)
182 S(_MS, __stdcall, = T__stdcall)
184 S(_MS, __fastcall, = T__fastcall)
186 S(_MS, _forceinline, )
187 S(_MS, __forceinline, = T__forceinline)
188 S(_MS, __unaligned, )
190 S(_MS, __assume, = T__assume)
192 S(_MS, __try, = T__try)
194 S(_MS, __finally, = T__finally)
196 S(_MS, __leave, = T__leave)
198 S(_MS, __except, = T__except)
200 S(_MS, __declspec, = T__declspec)
202 S(_MS, __based, = T__based)
210 S(_MS, __w64, = T__w64)
213 S(_MS, __int8, = T__int8)
215 S(_MS, __int16, = T__int16)
217 S(_MS, __int32, = T__int32)
219 S(_MS, __int64, = T__int64)
221 S(_MS, __int128, = T__int128)
224 /* Redefine required macros for MinGW headers */
225 #if defined(__MINGW32__) || defined(__CYGWIN__)
226 #define __stdcall __attribute__((__stdcall__))
227 #define __fastcall __attribute__((__fastcall__))
228 #define __cdecl __attribute__((__cdecl__))