diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 11:13:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 11:13:56 -0700 |
commit | f73ca60933f0145696081b7727f172a8f21e148e (patch) | |
tree | 9397a6a3a850816017abe726ab1cace40b7399af /symbol.c | |
parent | [PATCH] Fix address space ordering problem (diff) | |
download | sparse-f73ca60933f0145696081b7727f172a8f21e148e.tar.gz sparse-f73ca60933f0145696081b7727f172a8f21e148e.tar.bz2 sparse-f73ca60933f0145696081b7727f172a8f21e148e.zip |
Warn about undefined preprocessor symbols at expansion time, not parse time
This means that we can do
#if defined(TOKEN) && TOKEN > 1
and we will _not_ warn even with -Wundef, since the "TOKEN > 1" test
will never even be expanded if TOKEN isn't defined.
Al Viro gets credit for the algorithm changes, I just did the actual coding.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -675,6 +675,7 @@ struct symbol bool_ctype, void_ctype, type_ctype, string_ctype, ptr_ctype, lazy_ptr_ctype, incomplete_ctype, label_ctype, bad_ctype; +struct symbol zero_int; #define __INIT_IDENT(str, res) { .len = sizeof(str)-1, .name = str, .reserved = res } #define __IDENT(n,str,res) \ |