mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
Allow global declaration after symbol definition
This experimental feature needs to be tested for all output formats which recognize global symbols.
This commit is contained in:
parent
dd1e6f5c37
commit
18152f0e33
1 changed files with 5 additions and 3 deletions
8
labels.c
8
labels.c
|
|
@ -362,9 +362,11 @@ void declare_as_global(char *label, char *special, efunc error)
|
|||
case GLOBAL_SYMBOL:
|
||||
break;
|
||||
case LOCAL_SYMBOL:
|
||||
if (!(lptr->defn.is_global & EXTERN_BIT))
|
||||
error(ERR_NONFATAL, "symbol `%s': GLOBAL directive must"
|
||||
" appear before symbol definition", label);
|
||||
if (!(lptr->defn.is_global & EXTERN_BIT)) {
|
||||
error(ERR_WARNING, "symbol `%s': GLOBAL directive "
|
||||
"after symbol definition is an experimental feature", label);
|
||||
lptr->defn.is_global = GLOBAL_SYMBOL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue