YA spurious-uninitialized-variable-warning test
[official-gcc.git] / gcc / c-gperf.h
blob0b79d11e7c9e5b74abf633b424087c680e8d4d1c
1 /* C code produced by gperf version 2.7.1 (19981006 egcs) */
2 /* Command-line: gperf -L C -F , 0, 0 -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ ./c-parse.gperf */
3 /* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
4 struct resword { const char *name; short token; enum rid rid; };
6 #define TOTAL_KEYWORDS 83
7 #define MIN_WORD_LENGTH 2
8 #define MAX_WORD_LENGTH 20
9 #define MIN_HASH_VALUE 8
10 #define MAX_HASH_VALUE 141
11 /* maximum key range = 134, duplicates = 0 */
13 #ifdef __GNUC__
14 __inline
15 #endif
16 static unsigned int
17 hash (str, len)
18 register const char *str;
19 register unsigned int len;
21 static unsigned char asso_values[] =
23 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
24 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
25 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
26 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
27 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
28 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
29 142, 142, 142, 142, 35, 142, 142, 142, 142, 142,
30 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
31 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
32 142, 142, 142, 142, 142, 1, 142, 90, 1, 28,
33 40, 6, 1, 24, 3, 13, 142, 36, 60, 14,
34 49, 3, 6, 142, 19, 8, 1, 50, 33, 11,
35 2, 23, 4, 142, 142, 142, 142, 142, 142, 142,
36 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
37 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
38 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
39 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
40 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
41 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
42 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
43 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
44 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
45 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
46 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
47 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
48 142, 142, 142, 142, 142, 142
50 register int hval = len;
52 switch (hval)
54 default:
55 case 3:
56 hval += asso_values[(unsigned char)str[2]];
57 case 2:
58 case 1:
59 hval += asso_values[(unsigned char)str[0]];
60 break;
62 return hval + asso_values[(unsigned char)str[len - 1]];
65 static struct resword wordlist[] =
67 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
68 {"out", TYPE_QUAL, RID_OUT},
69 {"", 0, 0},
70 {"float", TYPESPEC, RID_FLOAT},
71 {"__typeof", TYPEOF, NORID},
72 {"", 0, 0},
73 {"__typeof__", TYPEOF, NORID},
74 {"typeof", TYPEOF, NORID},
75 {"typedef", SCSPEC, RID_TYPEDEF},
76 {"if", IF, NORID},
77 {"short", TYPESPEC, RID_SHORT},
78 {"int", TYPESPEC, RID_INT},
79 {"sizeof", SIZEOF, NORID},
80 {"__signed__", TYPESPEC, RID_SIGNED},
81 {"__extension__", EXTENSION, NORID},
82 {"inout", TYPE_QUAL, RID_INOUT},
83 {"__imag__", IMAGPART, NORID},
84 {"else", ELSE, NORID},
85 {"__inline__", SCSPEC, RID_INLINE},
86 {"byref", TYPE_QUAL, RID_BYREF},
87 {"__iterator__", SCSPEC, RID_ITERATOR},
88 {"__inline", SCSPEC, RID_INLINE},
89 {"__real__", REALPART, NORID},
90 {"switch", SWITCH, NORID},
91 {"__restrict", TYPE_QUAL, RID_RESTRICT},
92 {"goto", GOTO, NORID},
93 {"__restrict__", TYPE_QUAL, RID_RESTRICT},
94 {"struct", STRUCT, NORID},
95 {"while", WHILE, NORID},
96 {"restrict", TYPE_QUAL, RID_RESTRICT},
97 {"__const", TYPE_QUAL, RID_CONST},
98 {"oneway", TYPE_QUAL, RID_ONEWAY},
99 {"__const__", TYPE_QUAL, RID_CONST},
100 {"__complex", TYPESPEC, RID_COMPLEX},
101 {"__complex__", TYPESPEC, RID_COMPLEX},
102 {"for", FOR, NORID},
103 {"__iterator", SCSPEC, RID_ITERATOR},
104 {"__imag", IMAGPART, NORID},
105 {"do", DO, NORID},
106 {"case", CASE, NORID},
107 {"__volatile__", TYPE_QUAL, RID_VOLATILE},
108 {"break", BREAK, NORID},
109 {"default", DEFAULT, NORID},
110 {"__volatile", TYPE_QUAL, RID_VOLATILE},
111 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
112 {"@defs", DEFS, NORID},
113 {"id", OBJECTNAME, RID_ID},
114 {"", 0, 0},
115 {"__signed", TYPESPEC, RID_SIGNED},
116 {"bycopy", TYPE_QUAL, RID_BYCOPY},
117 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
118 {"extern", SCSPEC, RID_EXTERN},
119 {"", 0, 0},
120 {"in", TYPE_QUAL, RID_IN},
121 {"", 0, 0},
122 {"@compatibility_alias", ALIAS, NORID},
123 {"", 0, 0},
124 {"@private", PRIVATE, NORID},
125 {"@selector", SELECTOR, NORID},
126 {"register", SCSPEC, RID_REGISTER},
127 {"__label__", LABEL, NORID},
128 {"", 0, 0}, {"", 0, 0},
129 {"enum", ENUM, NORID},
130 {"return", RETURN, NORID},
131 {"", 0, 0}, {"", 0, 0},
132 {"signed", TYPESPEC, RID_SIGNED},
133 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
134 {"const", TYPE_QUAL, RID_CONST},
135 {"", 0, 0},
136 {"inline", SCSPEC, RID_INLINE},
137 {"__real", REALPART, NORID},
138 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
139 {"void", TYPESPEC, RID_VOID},
140 {"continue", CONTINUE, NORID},
141 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
142 {"@encode", ENCODE, NORID},
143 {"auto", SCSPEC, RID_AUTO},
144 {"__asm__", ASM_KEYWORD, NORID},
145 {"@interface", INTERFACE, NORID},
146 {"__alignof", ALIGNOF, NORID},
147 {"double", TYPESPEC, RID_DOUBLE},
148 {"__alignof__", ALIGNOF, NORID},
149 {"@protected", PROTECTED, NORID},
150 {"__attribute__", ATTRIBUTE, NORID},
151 {"unsigned", TYPESPEC, RID_UNSIGNED},
152 {"volatile", TYPE_QUAL, RID_VOLATILE},
153 {"__attribute", ATTRIBUTE, NORID},
154 {"@class", CLASS, NORID},
155 {"__asm", ASM_KEYWORD, NORID},
156 {"", 0, 0}, {"", 0, 0},
157 {"@implementation", IMPLEMENTATION, NORID},
158 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
159 {"union", UNION, NORID},
160 {"", 0, 0}, {"", 0, 0},
161 {"@public", PUBLIC, NORID},
162 {"asm", ASM_KEYWORD, NORID},
163 {"", 0, 0},
164 {"@protocol", PROTOCOL, NORID},
165 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
166 {"@end", END, NORID},
167 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
168 {"static", SCSPEC, RID_STATIC},
169 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
170 {"long", TYPESPEC, RID_LONG},
171 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
172 {"char", TYPESPEC, RID_CHAR}
175 #ifdef __GNUC__
176 __inline
177 #endif
178 struct resword *
179 is_reserved_word (str, len)
180 register const char *str;
181 register unsigned int len;
183 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
185 register int key = hash (str, len);
187 if (key <= MAX_HASH_VALUE && key >= 0)
189 register const char *s = wordlist[key].name;
191 if (*str == *s && !strcmp (str + 1, s + 1))
192 return &wordlist[key];
195 return 0;