]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/macro.c
Fix some PID/TPID fallout for HP/UX.
[thirdparty/binutils-gdb.git] / gas / macro.c
index 8512208da553270382705043f9be8f6942119ad4..e93cdce6e7bacc6f3eef2b1bd0d40eaec4a3aa07 100644 (file)
@@ -935,21 +935,29 @@ macro_expand (idx, in, m, out, comment_char)
       /* The macro may be called with an optional qualifier, which may
          be referred to in the macro body as \0.  */
       if (idx < in->len && in->ptr[idx] == '.')
-       {
-         formal_entry *n;
-
-         n = (formal_entry *) xmalloc (sizeof (formal_entry));
-         sb_new (&n->name);
-         sb_new (&n->def);
-         sb_new (&n->actual);
-         n->index = QUAL_INDEX;
-
-         n->next = m->formals;
-         m->formals = n;
-
-         idx = get_any_string (idx + 1, in, &n->actual, 1, 0);
-       }
-    }
+        {
+          /* The Microtec assembler ignores this if followed by a white space.
+                  (Macro invocation with empty extension) */
+          idx++;
+          if (    idx < in->len
+                   && in->ptr[idx] != ' '
+               && in->ptr[idx] != '\t')
+            {
+              formal_entry *n;
+
+              n = (formal_entry *) xmalloc (sizeof (formal_entry));
+              sb_new (&n->name);
+              sb_new (&n->def);
+              sb_new (&n->actual);
+              n->index = QUAL_INDEX;
+
+              n->next = m->formals;
+              m->formals = n;
+
+              idx = get_any_string (idx, in, &n->actual, 1, 0);
+            }
+        }
+  }
 
   /* Peel off the actuals and store them away in the hash tables' actuals.  */
   idx = sb_skip_white (idx, in);