diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-01-02 22:20:21 +0300 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2006-12-05 03:08:58 -0800 |
commit | 3c083484a3594f3c4e72fc06c001418a67dfe71a (patch) | |
tree | c90b2526ca36e8db30a00ce8ea41bbe45e45e1ec /symbol.h | |
parent | prepare for #strong_{define,undef} (diff) | |
download | sparse-3c083484a3594f3c4e72fc06c001418a67dfe71a.tar.gz sparse-3c083484a3594f3c4e72fc06c001418a67dfe71a.tar.bz2 sparse-3c083484a3594f3c4e72fc06c001418a67dfe71a.zip |
implement #strong_define
Example
#strong_define FOO 1
#undef FOO // silently ignored
#define FOO 2 // silently ignored
This allows (for example) to override CONFIG_XXX values without
editing include/linux/autoconf.h
I think this is useful. If you think differently, I will appreciate
your comments on this patch correctness.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Diffstat (limited to 'symbol.h')
-rw-r--r-- | symbol.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -82,13 +82,14 @@ struct symbol_op { extern int expand_safe_p(struct expression *expr, int cost); extern int expand_constant_p(struct expression *expr, int cost); -#define SYM_ATTR_WEAK 1 -#define SYM_ATTR_NORMAL 0 +#define SYM_ATTR_WEAK 0 +#define SYM_ATTR_NORMAL 1 +#define SYM_ATTR_STRONG 2 struct symbol { enum namespace namespace:8; enum type type:8; - unsigned char used:1, attr:1; + unsigned char used:1, attr:2; struct position pos; /* Where this symbol was declared */ struct ident *ident; /* What identifier this symbol is associated with */ struct symbol *next_id; /* Next semantic symbol that shares this identifier */ |