xref: /illumos-gate/usr/src/tools/smatch/src/validation/reserved.c (revision 1f5207b7604fb44407eb4342aff613f7c4508508)
1*1f5207b7SJohn Levon static int (auto);
2*1f5207b7SJohn Levon static int (break);
3*1f5207b7SJohn Levon static int (case);
4*1f5207b7SJohn Levon static int (char);
5*1f5207b7SJohn Levon static int (const);
6*1f5207b7SJohn Levon static int (__const);
7*1f5207b7SJohn Levon static int (__const__);
8*1f5207b7SJohn Levon static int (continue);
9*1f5207b7SJohn Levon static int (default);
10*1f5207b7SJohn Levon static int (do);
11*1f5207b7SJohn Levon static int (double);
12*1f5207b7SJohn Levon static int (else);
13*1f5207b7SJohn Levon static int (enum);
14*1f5207b7SJohn Levon static int (extern);
15*1f5207b7SJohn Levon static int (float);
16*1f5207b7SJohn Levon static int (for);
17*1f5207b7SJohn Levon static int (goto);
18*1f5207b7SJohn Levon static int (if);
19*1f5207b7SJohn Levon static int (inline);
20*1f5207b7SJohn Levon static int (__inline);
21*1f5207b7SJohn Levon static int (__inline__);
22*1f5207b7SJohn Levon static int (int);
23*1f5207b7SJohn Levon static int (long);
24*1f5207b7SJohn Levon static int (register);
25*1f5207b7SJohn Levon static int (restrict);
26*1f5207b7SJohn Levon static int (__restrict);
27*1f5207b7SJohn Levon static int (__restrict__);
28*1f5207b7SJohn Levon static int (return);
29*1f5207b7SJohn Levon static int (short);
30*1f5207b7SJohn Levon static int (signed);
31*1f5207b7SJohn Levon static int (sizeof);
32*1f5207b7SJohn Levon static int (static);
33*1f5207b7SJohn Levon static int (struct);
34*1f5207b7SJohn Levon static int (switch);
35*1f5207b7SJohn Levon static int (typedef);
36*1f5207b7SJohn Levon static int (union);
37*1f5207b7SJohn Levon static int (unsigned);
38*1f5207b7SJohn Levon static int (void);
39*1f5207b7SJohn Levon static int (volatile);
40*1f5207b7SJohn Levon static int (volatile);
41*1f5207b7SJohn Levon static int (__volatile);
42*1f5207b7SJohn Levon static int (__volatile__);
43*1f5207b7SJohn Levon static int (while);
44*1f5207b7SJohn Levon 
45*1f5207b7SJohn Levon static int (_Alignas);
46*1f5207b7SJohn Levon static int (_Alignof);
47*1f5207b7SJohn Levon static int (_Atomic);
48*1f5207b7SJohn Levon static int (_Bool);
49*1f5207b7SJohn Levon static int (_Complex);
50*1f5207b7SJohn Levon static int (_Generic);
51*1f5207b7SJohn Levon static int (_Imaginary);
52*1f5207b7SJohn Levon static int (_Noreturn);
53*1f5207b7SJohn Levon static int (_Static_assert);
54*1f5207b7SJohn Levon static int (_Thread_local);
55*1f5207b7SJohn Levon 
56*1f5207b7SJohn Levon // Sparse extensions
57*1f5207b7SJohn Levon static int (__context__);
58*1f5207b7SJohn Levon static int (__range__);
59*1f5207b7SJohn Levon static int (__sizeof_ptr__);
60*1f5207b7SJohn Levon 
61*1f5207b7SJohn Levon // GCC extensions
62*1f5207b7SJohn Levon static int (__alignof);
63*1f5207b7SJohn Levon static int (__alignof__);
64*1f5207b7SJohn Levon static int (asm);			// not reserved!
65*1f5207b7SJohn Levon static int (__asm);
66*1f5207b7SJohn Levon static int (__asm__);
67*1f5207b7SJohn Levon static int (__label__);
68*1f5207b7SJohn Levon static int (__thread);
69*1f5207b7SJohn Levon static int (typeof);
70*1f5207b7SJohn Levon static int (__typeof);
71*1f5207b7SJohn Levon static int (__typeof__);
72*1f5207b7SJohn Levon 
73*1f5207b7SJohn Levon static int (__int128);
74*1f5207b7SJohn Levon static int (__int128_t);
75*1f5207b7SJohn Levon static int (__uint128_t);
76*1f5207b7SJohn Levon 
77*1f5207b7SJohn Levon static int (__builtin_ms_va_list);
78*1f5207b7SJohn Levon static int (__builtin_offsetof);
79*1f5207b7SJohn Levon static int (__builtin_types_compatible_p);
80*1f5207b7SJohn Levon static int (__builtin_va_list);
81*1f5207b7SJohn Levon 
82*1f5207b7SJohn Levon /*
83*1f5207b7SJohn Levon  * check-name: const et.al. are reserved identifiers
84*1f5207b7SJohn Levon  * check-error-start:
85*1f5207b7SJohn Levon reserved.c:1:12: error: Trying to use reserved word 'auto' as identifier
86*1f5207b7SJohn Levon reserved.c:2:12: error: Trying to use reserved word 'break' as identifier
87*1f5207b7SJohn Levon reserved.c:3:12: error: Trying to use reserved word 'case' as identifier
88*1f5207b7SJohn Levon reserved.c:4:12: error: Trying to use reserved word 'char' as identifier
89*1f5207b7SJohn Levon reserved.c:5:12: error: Trying to use reserved word 'const' as identifier
90*1f5207b7SJohn Levon reserved.c:6:12: error: Trying to use reserved word '__const' as identifier
91*1f5207b7SJohn Levon reserved.c:7:12: error: Trying to use reserved word '__const__' as identifier
92*1f5207b7SJohn Levon reserved.c:8:12: error: Trying to use reserved word 'continue' as identifier
93*1f5207b7SJohn Levon reserved.c:9:12: error: Trying to use reserved word 'default' as identifier
94*1f5207b7SJohn Levon reserved.c:10:12: error: Trying to use reserved word 'do' as identifier
95*1f5207b7SJohn Levon reserved.c:11:12: error: Trying to use reserved word 'double' as identifier
96*1f5207b7SJohn Levon reserved.c:12:12: error: Trying to use reserved word 'else' as identifier
97*1f5207b7SJohn Levon reserved.c:13:12: error: Trying to use reserved word 'enum' as identifier
98*1f5207b7SJohn Levon reserved.c:14:12: error: Trying to use reserved word 'extern' as identifier
99*1f5207b7SJohn Levon reserved.c:15:12: error: Trying to use reserved word 'float' as identifier
100*1f5207b7SJohn Levon reserved.c:16:12: error: Trying to use reserved word 'for' as identifier
101*1f5207b7SJohn Levon reserved.c:17:12: error: Trying to use reserved word 'goto' as identifier
102*1f5207b7SJohn Levon reserved.c:18:12: error: Trying to use reserved word 'if' as identifier
103*1f5207b7SJohn Levon reserved.c:19:12: error: Trying to use reserved word 'inline' as identifier
104*1f5207b7SJohn Levon reserved.c:20:12: error: Trying to use reserved word '__inline' as identifier
105*1f5207b7SJohn Levon reserved.c:21:12: error: Trying to use reserved word '__inline__' as identifier
106*1f5207b7SJohn Levon reserved.c:22:12: error: Trying to use reserved word 'int' as identifier
107*1f5207b7SJohn Levon reserved.c:23:12: error: Trying to use reserved word 'long' as identifier
108*1f5207b7SJohn Levon reserved.c:24:12: error: Trying to use reserved word 'register' as identifier
109*1f5207b7SJohn Levon reserved.c:25:12: error: Trying to use reserved word 'restrict' as identifier
110*1f5207b7SJohn Levon reserved.c:26:12: error: Trying to use reserved word '__restrict' as identifier
111*1f5207b7SJohn Levon reserved.c:27:12: error: Trying to use reserved word '__restrict__' as identifier
112*1f5207b7SJohn Levon reserved.c:28:12: error: Trying to use reserved word 'return' as identifier
113*1f5207b7SJohn Levon reserved.c:29:12: error: Trying to use reserved word 'short' as identifier
114*1f5207b7SJohn Levon reserved.c:30:12: error: Trying to use reserved word 'signed' as identifier
115*1f5207b7SJohn Levon reserved.c:31:12: error: Trying to use reserved word 'sizeof' as identifier
116*1f5207b7SJohn Levon reserved.c:32:12: error: Trying to use reserved word 'static' as identifier
117*1f5207b7SJohn Levon reserved.c:33:12: error: Trying to use reserved word 'struct' as identifier
118*1f5207b7SJohn Levon reserved.c:34:12: error: Trying to use reserved word 'switch' as identifier
119*1f5207b7SJohn Levon reserved.c:35:12: error: Trying to use reserved word 'typedef' as identifier
120*1f5207b7SJohn Levon reserved.c:36:12: error: Trying to use reserved word 'union' as identifier
121*1f5207b7SJohn Levon reserved.c:37:12: error: Trying to use reserved word 'unsigned' as identifier
122*1f5207b7SJohn Levon reserved.c:38:12: error: Trying to use reserved word 'void' as identifier
123*1f5207b7SJohn Levon reserved.c:39:12: error: Trying to use reserved word 'volatile' as identifier
124*1f5207b7SJohn Levon reserved.c:40:12: error: Trying to use reserved word 'volatile' as identifier
125*1f5207b7SJohn Levon reserved.c:41:12: error: Trying to use reserved word '__volatile' as identifier
126*1f5207b7SJohn Levon reserved.c:42:12: error: Trying to use reserved word '__volatile__' as identifier
127*1f5207b7SJohn Levon reserved.c:43:12: error: Trying to use reserved word 'while' as identifier
128*1f5207b7SJohn Levon reserved.c:45:12: error: Trying to use reserved word '_Alignas' as identifier
129*1f5207b7SJohn Levon reserved.c:46:12: error: Trying to use reserved word '_Alignof' as identifier
130*1f5207b7SJohn Levon reserved.c:47:12: error: Trying to use reserved word '_Atomic' as identifier
131*1f5207b7SJohn Levon reserved.c:48:12: error: Trying to use reserved word '_Bool' as identifier
132*1f5207b7SJohn Levon reserved.c:49:12: error: Trying to use reserved word '_Complex' as identifier
133*1f5207b7SJohn Levon reserved.c:50:12: error: Trying to use reserved word '_Generic' as identifier
134*1f5207b7SJohn Levon reserved.c:51:12: error: Trying to use reserved word '_Imaginary' as identifier
135*1f5207b7SJohn Levon reserved.c:52:12: error: Trying to use reserved word '_Noreturn' as identifier
136*1f5207b7SJohn Levon reserved.c:53:12: error: Trying to use reserved word '_Static_assert' as identifier
137*1f5207b7SJohn Levon reserved.c:54:12: error: Trying to use reserved word '_Thread_local' as identifier
138*1f5207b7SJohn Levon reserved.c:57:12: error: Trying to use reserved word '__context__' as identifier
139*1f5207b7SJohn Levon reserved.c:58:12: error: Trying to use reserved word '__range__' as identifier
140*1f5207b7SJohn Levon reserved.c:59:12: error: Trying to use reserved word '__sizeof_ptr__' as identifier
141*1f5207b7SJohn Levon reserved.c:62:12: error: Trying to use reserved word '__alignof' as identifier
142*1f5207b7SJohn Levon reserved.c:63:12: error: Trying to use reserved word '__alignof__' as identifier
143*1f5207b7SJohn Levon reserved.c:65:12: error: Trying to use reserved word '__asm' as identifier
144*1f5207b7SJohn Levon reserved.c:66:12: error: Trying to use reserved word '__asm__' as identifier
145*1f5207b7SJohn Levon reserved.c:67:12: error: Trying to use reserved word '__label__' as identifier
146*1f5207b7SJohn Levon reserved.c:68:12: error: Trying to use reserved word '__thread' as identifier
147*1f5207b7SJohn Levon reserved.c:69:12: error: Trying to use reserved word 'typeof' as identifier
148*1f5207b7SJohn Levon reserved.c:70:12: error: Trying to use reserved word '__typeof' as identifier
149*1f5207b7SJohn Levon reserved.c:71:12: error: Trying to use reserved word '__typeof__' as identifier
150*1f5207b7SJohn Levon reserved.c:73:12: error: Trying to use reserved word '__int128' as identifier
151*1f5207b7SJohn Levon reserved.c:74:12: error: Trying to use reserved word '__int128_t' as identifier
152*1f5207b7SJohn Levon reserved.c:75:12: error: Trying to use reserved word '__uint128_t' as identifier
153*1f5207b7SJohn Levon reserved.c:77:12: error: Trying to use reserved word '__builtin_ms_va_list' as identifier
154*1f5207b7SJohn Levon reserved.c:78:12: error: Trying to use reserved word '__builtin_offsetof' as identifier
155*1f5207b7SJohn Levon reserved.c:79:12: error: Trying to use reserved word '__builtin_types_compatible_p' as identifier
156*1f5207b7SJohn Levon reserved.c:80:12: error: Trying to use reserved word '__builtin_va_list' as identifier
157*1f5207b7SJohn Levon  * check-error-end:
158*1f5207b7SJohn Levon  */
159