diff options
author | 2009-03-09 07:12:18 +0000 | |
---|---|---|
committer | 2009-07-17 23:06:23 +0000 | |
commit | 319206abe1f2b2981f0912336a2859039bea0e2c (patch) | |
tree | 5e056496be0660cd3ac84a9833ef02e9ec1e77df /symbol.h | |
parent | Saner type for __builtin_va_list (diff) | |
download | sparse-319206abe1f2b2981f0912336a2859039bea0e2c.tar.gz sparse-319206abe1f2b2981f0912336a2859039bea0e2c.tar.bz2 sparse-319206abe1f2b2981f0912336a2859039bea0e2c.zip |
Rewrite and fix specifiers handling
Make sure that we accept the right set; kill ad-hackery around checks
for banned combinations. Instead of that we keep a bitmap describing
what we'd already seen (with several extra bits for 'long long' and
for keeping track of can't-combine-with-anything stuff), check and
update it using the values in ..._op and keep track of size modifiers
more or less explicitly.
Testcases added. A _lot_ of that used to be done wrong.
Note that __attribute__((mode(...))) got more broken by this one;
the next several changesets will take care of that.
One more thing: we are -><- close to getting rid of MOD_SPECIFIER bits
for good.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'symbol.h')
-rw-r--r-- | symbol.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -64,11 +64,11 @@ enum keyword { KW_MODIFIER = 1 << 1, KW_QUALIFIER = 1 << 2, KW_ATTRIBUTE = 1 << 3, - KW_TYPEOF = 1 << 4, - KW_STATEMENT = 1 << 5, - KW_ASM = 1 << 6, - KW_MODE = 1 << 7, - KW_SPEC = 1 << 8, + KW_STATEMENT = 1 << 4, + KW_ASM = 1 << 5, + KW_MODE = 1 << 6, + KW_SHORT = 1 << 7, + KW_LONG = 1 << 8, }; struct context { @@ -105,6 +105,8 @@ struct symbol_op { struct token *(*statement)(struct token *token, struct statement *stmt); struct token *(*toplevel)(struct token *token, struct symbol_list **list); struct token *(*attribute)(struct token *token, struct symbol *attr, struct ctype *ctype); + + int test, set, class; }; extern int expand_safe_p(struct expression *expr, int cost); |