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