preproc.c: modified deprecation warning for context-local label fallthrough
authorKeith Kanios <keith@kanios.net>
Wed, 11 Aug 2010 01:12:57 +0000 (20:12 -0500)
committerKeith Kanios <keith@kanios.net>
Wed, 11 Aug 2010 01:12:57 +0000 (20:12 -0500)
preproc.c

index 4aff704..186e724 100644 (file)
--- a/preproc.c
+++ b/preproc.c
@@ -1459,21 +1459,22 @@ static Context *get_ctx(const char *name, const char **namep,
     if (namep)
         *namep = name;
 
-    if (!all_contexts) {
+    if (!all_contexts)
         return ctx;
-       } else {
-               error(ERR_WARNING, "context-local label expansion"
-                         " to outer contexts will be deprecated"
-                         " starting in NASM 2.10, please update your"
-                         " code accordingly");
-       }
 
     do {
         /* Search for this smacro in found context */
         m = hash_findix(&ctx->localmac, name);
         while (m) {
-            if (!mstrcmp(m->name, name, m->casesense))
+            if (!mstrcmp(m->name, name, m->casesense)) {
+                               if ((i > 0) && (all_contexts == true)) {
+                                       error(ERR_WARNING, "context-local label expansion"
+                                                 " to outer contexts will be deprecated"
+                                                 " starting in NASM 2.10, please update your"
+                                                 " code accordingly");
+                               }
                 return ctx;
+                       }
             m = m->next;
         }
         ctx = ctx->next;