keyword: regroup the [reserved] keywords
[smatch.git] / ident-list.h
blobdbed0685830e93221e8517c14208bd92e10a8a59
2 #define IDENT(n) __IDENT(n## _ident, #n, 0)
3 #define IDENT_RESERVED(n) __IDENT(n## _ident, #n, 1)
5 /* Basic C reserved words.. */
6 IDENT_RESERVED(sizeof);
7 IDENT_RESERVED(if);
8 IDENT_RESERVED(else);
9 IDENT_RESERVED(return);
10 IDENT_RESERVED(switch);
11 IDENT_RESERVED(case);
12 IDENT_RESERVED(default);
13 IDENT_RESERVED(break);
14 IDENT_RESERVED(continue);
15 IDENT_RESERVED(for);
16 IDENT_RESERVED(while);
17 IDENT_RESERVED(do);
18 IDENT_RESERVED(goto);
20 /* C typenames. They get marked as reserved when initialized */
21 IDENT(struct);
22 IDENT(union);
23 IDENT(enum);
24 IDENT(__attribute); IDENT(__attribute__);
25 IDENT(volatile); IDENT(__volatile); IDENT(__volatile__);
26 IDENT(double);
28 /* C storage classes. They get marked as reserved when initialized */
29 IDENT(static);
31 /* C99 keywords */
32 IDENT(restrict); IDENT(__restrict); IDENT(__restrict__);
34 /* C11 keywords */
35 IDENT_RESERVED(_Alignof);
36 IDENT_RESERVED(_Static_assert);
38 /* Special case for L'\t' */
39 IDENT(L);
41 /* Extended gcc identifiers */
42 IDENT(asm); IDENT_RESERVED(__asm); IDENT_RESERVED(__asm__);
43 IDENT(alignof); IDENT_RESERVED(__alignof); IDENT_RESERVED(__alignof__);
44 IDENT_RESERVED(__sizeof_ptr__);
45 IDENT_RESERVED(__builtin_types_compatible_p);
46 IDENT_RESERVED(__builtin_offsetof);
47 IDENT_RESERVED(__label__);
49 /* Attribute names */
50 IDENT(packed); IDENT(__packed__);
51 IDENT(aligned); IDENT(__aligned__);
52 IDENT(nocast);
53 IDENT(noderef);
54 IDENT(safe);
55 IDENT(force);
56 IDENT(address_space);
57 IDENT(context);
58 IDENT(mode); IDENT(__mode__);
59 IDENT(QI); IDENT(__QI__);
60 IDENT(HI); IDENT(__HI__);
61 IDENT(SI); IDENT(__SI__);
62 IDENT(DI); IDENT(__DI__);
63 IDENT(word); IDENT(__word__);
64 IDENT(format); IDENT(__format__);
65 IDENT(section); IDENT(__section__);
66 IDENT(unused); IDENT(__unused__);
67 IDENT(const); IDENT(__const); IDENT(__const__);
68 IDENT(used); IDENT(__used__);
69 IDENT(warn_unused_result); IDENT(__warn_unused_result__);
70 IDENT(noinline); IDENT(__noinline__);
71 IDENT(deprecated); IDENT(__deprecated__);
72 IDENT(noreturn); IDENT(__noreturn__);
73 IDENT(regparm); IDENT(__regparm__);
74 IDENT(weak); IDENT(__weak__);
75 IDENT(no_instrument_function); IDENT(__no_instrument_function__);
76 IDENT(sentinel); IDENT(__sentinel__);
77 IDENT(alias); IDENT(__alias__);
78 IDENT(pure); IDENT(__pure__);
79 IDENT(always_inline); IDENT(__always_inline__);
80 IDENT(syscall_linkage); IDENT(__syscall_linkage__);
81 IDENT(visibility); IDENT(__visibility__);
82 IDENT(bitwise); IDENT(__bitwise__);
83 IDENT(model); IDENT(__model__);
84 IDENT(format_arg); IDENT(__format_arg__);
85 IDENT(nothrow); IDENT(__nothrow); IDENT(__nothrow__);
86 IDENT(__transparent_union__);
87 IDENT(malloc);
88 IDENT(__malloc__);
89 IDENT(nonnull); IDENT(__nonnull); IDENT(__nonnull__);
90 IDENT(constructor); IDENT(__constructor__);
91 IDENT(destructor); IDENT(__destructor__);
92 IDENT(cold); IDENT(__cold__);
93 IDENT(hot); IDENT(__hot__);
94 IDENT(cdecl); IDENT(__cdecl__);
95 IDENT(stdcall); IDENT(__stdcall__);
96 IDENT(fastcall); IDENT(__fastcall__);
97 IDENT(dllimport); IDENT(__dllimport__);
98 IDENT(dllexport); IDENT(__dllexport__);
99 IDENT(artificial); IDENT(__artificial__);
100 IDENT(leaf); IDENT(__leaf__);
101 IDENT(vector_size); IDENT(__vector_size__);
102 IDENT(error); IDENT(__error__);
105 /* Preprocessor idents. Direct use of __IDENT avoids mentioning the keyword
106 * itself by name, preventing these tokens from expanding when compiling
107 * sparse. */
108 IDENT(defined);
109 IDENT(once);
110 __IDENT(pragma_ident, "__pragma__", 0);
111 __IDENT(__VA_ARGS___ident, "__VA_ARGS__", 0);
112 __IDENT(__LINE___ident, "__LINE__", 0);
113 __IDENT(__FILE___ident, "__FILE__", 0);
114 __IDENT(__DATE___ident, "__DATE__", 0);
115 __IDENT(__TIME___ident, "__TIME__", 0);
116 __IDENT(__func___ident, "__func__", 0);
117 __IDENT(__FUNCTION___ident, "__FUNCTION__", 0);
118 __IDENT(__PRETTY_FUNCTION___ident, "__PRETTY_FUNCTION__", 0);
119 __IDENT(__COUNTER___ident, "__COUNTER__", 0);
121 /* Sparse commands */
122 IDENT_RESERVED(__context__);
123 IDENT_RESERVED(__range__);
125 /* Magic function names we recognize */
126 IDENT(memset); IDENT(memcpy);
127 IDENT(copy_to_user); IDENT(copy_from_user);
128 IDENT(main);
130 #undef __IDENT
131 #undef IDENT
132 #undef IDENT_RESERVED