cppmacro.c (cpp_macro_definition): Do not emit spaces after macro formal parameter...
authorJim Blandy <jimb@redhat.com>
Fri, 5 Apr 2002 00:12:40 +0000 (00:12 +0000)
committerJim Blandy <jimb@gcc.gnu.org>
Fri, 5 Apr 2002 00:12:40 +0000 (00:12 +0000)
* cppmacro.c (cpp_macro_definition): Do not emit spaces after
macro formal parameter names.

From-SVN: r51890

gcc/ChangeLog
gcc/cppmacro.c

index eb3270e925f1a3bb644904d29a769286b85fbd05..f9c6ac23daa2566448292c87e02cc27586cf0b8d 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-04  Jim Blandy  <jimb@redhat.com>
+
+       * cppmacro.c (cpp_macro_definition): Do not emit spaces after
+       macro formal parameter names.
+
 2002-04-04  David S. Miller  <davem@redhat.com>
 
        * calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg.
index 3ce44be504c5a596664145afc75a84e80689f901..a022581f84ff0a61bcea3b831f6e50ea2e884c38 100644 (file)
@@ -1508,10 +1508,10 @@ cpp_macro_definition (pfile, node)
   len = NODE_LEN (node) + 1;                   /* ' ' */
   if (macro->fun_like)
     {
-      len += 3;                /* "()" plus possible final "." of named
-                          varargs (we have + 2 below).  */
+      len += 4;                /* "()" plus possible final ".." of named
+                          varargs (we have + 1 below).  */
       for (i = 0; i < macro->paramc; i++)
-       len += NODE_LEN (macro->params[i]) + 2; /* ", " */
+       len += NODE_LEN (macro->params[i]) + 1; /* "," */
     }
 
   for (i = 0; i < macro->count; i++)
@@ -1554,7 +1554,10 @@ cpp_macro_definition (pfile, node)
            }
 
          if (i + 1 < macro->paramc)
-           *buffer++ = ',', *buffer++ = ' ';
+            /* Don't emit a space after the comma here; we're trying
+               to emit a Dwarf-friendly definition, and the Dwarf spec
+               forbids spaces in the argument list.  */
+           *buffer++ = ',';
          else if (macro->variadic)
            *buffer++ = '.', *buffer++ = '.', *buffer++ = '.';
        }