diff options
author | Josh Triplett <josh@freedesktop.org> | 2007-03-07 21:40:15 -0800 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2007-03-07 21:40:15 -0800 |
commit | af30c6df74f01db10fa78ac0cbdb5c3c40b5c73f (patch) | |
tree | 32983dd28adb96057d7e84dcbca727c62dea9235 /symbol.c | |
parent | Moving statement parsing into smaller functions. (diff) | |
download | sparse-af30c6df74f01db10fa78ac0cbdb5c3c40b5c73f.tar.gz sparse-af30c6df74f01db10fa78ac0cbdb5c3c40b5c73f.tar.bz2 sparse-af30c6df74f01db10fa78ac0cbdb5c3c40b5c73f.zip |
Free up some special bits in modifiers.
This change using symbol_op to contain the specifier parsing
function. It is easier to add new specifiers. We don't need
special bits any more.
Signed-Off-By: Christopher Li <sparse@chrisli.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 35 |
1 files changed, 1 insertions, 34 deletions
@@ -678,43 +678,9 @@ static struct sym_init { { "__label__", &label_ctype, MOD_LABEL | MOD_UNSIGNED }, { "_Bool", &bool_ctype, MOD_UNSIGNED }, - /* Type qualifiers */ - { "const", NULL, MOD_CONST }, - { "__const", NULL, MOD_CONST }, - { "__const__", NULL, MOD_CONST }, - { "volatile", NULL, MOD_VOLATILE }, - { "__volatile", NULL, MOD_VOLATILE }, - { "__volatile__", NULL, MOD_VOLATILE }, - /* Predeclared types */ { "__builtin_va_list", &int_type, 0 }, - /* Typedef.. */ - { "typedef", NULL, MOD_TYPEDEF }, - - /* Extended types */ - { "typeof", NULL, MOD_TYPEOF }, - { "__typeof", NULL, MOD_TYPEOF }, - { "__typeof__", NULL, MOD_TYPEOF }, - -#if 0 - { "attribute", NULL, MOD_ATTRIBUTE }, -#endif - { "__attribute", NULL, MOD_ATTRIBUTE }, - { "__attribute__", NULL, MOD_ATTRIBUTE }, - - { "struct", NULL, MOD_STRUCTOF }, - { "union", NULL, MOD_UNIONOF }, - { "enum", NULL, MOD_ENUMOF }, - - { "inline", NULL, MOD_INLINE }, - { "__inline", NULL, MOD_INLINE }, - { "__inline__", NULL, MOD_INLINE }, - - /* Ignored for now.. */ - { "restrict", NULL, 0 }, - { "__restrict", NULL, 0 }, - { NULL, NULL, 0 } }; @@ -794,6 +760,7 @@ void init_symbols(void) hash_ident(&n) #include "ident-list.h" + init_parser(stream); for (ptr = symbol_init_table; ptr->name; ptr++) { struct symbol *sym; sym = create_symbol(stream, ptr->name, SYM_NODE, NS_TYPEDEF); |