diff options
author | 2006-01-02 22:20:12 +0300 | |
---|---|---|
committer | 2006-12-05 03:04:36 -0800 | |
commit | 7207be8d9e4de12b91e8b7f4a5a82019a5c48744 (patch) | |
tree | 8a3a67e0089eb70499ac4381d314ab11c2d8d184 /symbol.h | |
parent | fix redefine of #weak_define (diff) | |
download | sparse-7207be8d9e4de12b91e8b7f4a5a82019a5c48744.tar.gz sparse-7207be8d9e4de12b91e8b7f4a5a82019a5c48744.tar.bz2 sparse-7207be8d9e4de12b91e8b7f4a5a82019a5c48744.zip |
fix 'weak' attribute loss
When NS_MACRO symbol is used, sparse clears it's 'weak' flag.
This is bad for multifile parsing, and wrong:
#weak_define FOO 1
FOO
#weak_define FOO 2 // silently ignored
After this patch sparse never writes to NS_MACRO symbols from
another scope (except ->used_in).
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Diffstat (limited to 'symbol.h')
-rw-r--r-- | symbol.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -99,6 +99,7 @@ struct symbol { struct /* NS_MACRO */ { struct token *expansion; struct token *arglist; + struct scope *used_in; }; struct /* NS_PREPROCESSOR */ { int (*handler)(struct stream *, struct token **, struct token *); |