diff options
author | 2004-12-17 10:41:32 -0700 | |
---|---|---|
committer | 2005-04-07 21:06:09 -0700 | |
commit | 5a9db425bb86132d1bfc2dd303b0e28b567d019a (patch) | |
tree | d9bfc7314936b85ba453f85d4484f6a9a3f9b578 /symbol.c | |
parent | Make "reg->busy" mean how many "operands" actually reference this (diff) | |
download | sparse-5a9db425bb86132d1bfc2dd303b0e28b567d019a.tar.gz sparse-5a9db425bb86132d1bfc2dd303b0e28b567d019a.tar.bz2 sparse-5a9db425bb86132d1bfc2dd303b0e28b567d019a.zip |
Toplevel symbols are externally addressable only if they
aren't static..
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -465,9 +465,11 @@ void bind_symbol(struct symbol *sym, struct ident *ident, enum namespace ns) scope = block_scope; if (ns == NS_SYMBOL && toplevel(scope)) { - sym->ctype.modifiers |= MOD_TOPLEVEL | MOD_ADDRESSABLE; + sym->ctype.modifiers |= MOD_TOPLEVEL; if (sym->ctype.modifiers & MOD_STATIC) scope = file_scope; + else + sym->ctype.modifiers |= MOD_ADDRESSABLE; } if (ns == NS_LABEL) scope = function_scope; |