From 18152f0e33e55050bf2cdca70f03a40a7d3eaac5 Mon Sep 17 00:00:00 2001 From: Charles Crayne Date: Wed, 28 Jan 2009 19:07:18 -0800 Subject: [PATCH] Allow global declaration after symbol definition This experimental feature needs to be tested for all output formats which recognize global symbols. --- labels.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/labels.c b/labels.c index df32315a..9a7fc615 100644 --- a/labels.c +++ b/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; } } -- 2.11.4.GIT