aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>2002-04-05 00:12:40 +0000
committerJim Blandy <jimb@gcc.gnu.org>2002-04-05 00:12:40 +0000
commit64d082630e1e8e85ee7322222482e7b4e00790ac (patch)
treed1c811c381c0ae9da8786d94121a07fb82d44f9f /gcc/cppmacro.c
parent3ca5f4443dc2218406ad981cf7135e9d5d3f7079 (diff)
downloadgcc-64d082630e1e8e85ee7322222482e7b4e00790ac.zip
gcc-64d082630e1e8e85ee7322222482e7b4e00790ac.tar.gz
gcc-64d082630e1e8e85ee7322222482e7b4e00790ac.tar.bz2
cppmacro.c (cpp_macro_definition): Do not emit spaces after macro formal parameter names.
* cppmacro.c (cpp_macro_definition): Do not emit spaces after macro formal parameter names. From-SVN: r51890
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 3ce44be..a022581 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++ = '.';
}