diff options
author | 2005-08-02 17:23:23 -0700 | |
---|---|---|
committer | 2005-08-02 17:23:23 -0700 | |
commit | 89f32d3da8d281e826bf33c4c3efa7149654ea23 (patch) | |
tree | bf1cec49fa15e87f307dedb4c893b2f7c2f9b550 /symbol.c | |
parent | When dropping all allocations, clear the freelist too (diff) | |
download | sparse-89f32d3da8d281e826bf33c4c3efa7149654ea23.tar.gz sparse-89f32d3da8d281e826bf33c4c3efa7149654ea23.tar.bz2 sparse-89f32d3da8d281e826bf33c4c3efa7149654ea23.zip |
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); |