diff options
author | Charles Crayne <chuck@thor.crayne.org> | 2009-01-28 19:07:18 -0800 |
---|---|---|
committer | Charles Crayne <chuck@thor.crayne.org> | 2009-01-28 19:07:18 -0800 |
commit | 18152f0e33e55050bf2cdca70f03a40a7d3eaac5 (patch) | |
tree | bf3f14a34d92d658ed73ce51f5e22f9ef3719027 /labels.c | |
parent | dd1e6f5c37cbd0b03c69726aebc84bf8861a686e (diff) | |
download | nasm-18152f0e33e55050bf2cdca70f03a40a7d3eaac5.tar.gz nasm-18152f0e33e55050bf2cdca70f03a40a7d3eaac5.tar.bz2 nasm-18152f0e33e55050bf2cdca70f03a40a7d3eaac5.zip |
Allow global declaration after symbol definition
This experimental feature needs to be tested for
all output formats which recognize global symbols.
Diffstat (limited to 'labels.c')
-rw-r--r-- | labels.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; } } |