diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-02 17:23:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-02 17:23:23 -0700 |
commit | 89f32d3da8d281e826bf33c4c3efa7149654ea23 (patch) | |
tree | bf1cec49fa15e87f307dedb4c893b2f7c2f9b550 /symbol.c | |
parent | d2b60d1311f15ebf45eff760e4815b009f6c1367 (diff) | |
download | sparse-89f32d3da8d281e826bf33c4c3efa7149654ea23.tar.gz |
Make macros have file scope
Also, macros are special: they can be removed out of scope with #undef,
which makes them slightly more interesting when we exit the scope.
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -469,6 +469,8 @@ void bind_symbol(struct symbol *sym, struct ident *ident, enum namespace ns) else sym->ctype.modifiers |= MOD_ADDRESSABLE; } + if (ns == NS_MACRO) + scope = file_scope; if (ns == NS_LABEL) scope = function_scope; bind_scope(sym, scope); |