summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjimb <jimb@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-05 00:12:40 +0000
committerjimb <jimb@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-05 00:12:40 +0000
commit3a68fd942304e9c2b7fb9887449175de3986e1f5 (patch)
treed1c811c381c0ae9da8786d94121a07fb82d44f9f
parent4dc2d86e8caf1d0106f984c3bb2dac01de6f5c17 (diff)
downloadgcc-3a68fd942304e9c2b7fb9887449175de3986e1f5.tar.gz
* cppmacro.c (cpp_macro_definition): Do not emit spaces after
macro formal parameter names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51890 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cppmacro.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eb3270e925f..f9c6ac23daa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 3ce44be504c..a022581f84f 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -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++ = '.';
}