aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-04 16:43:42 +0000
committerRichard Stallman <rms@gnu.org>1993-05-04 16:43:42 +0000
commit148597b92e4ddb95ddcd53cbfad000845f831474 (patch)
treee4676af80d53f23536969e003d5b2c48dfafbfd8 /gcc
parent77cb83306cc03794a739dcf191e23b7fb55d36aa (diff)
downloadgcc-148597b92e4ddb95ddcd53cbfad000845f831474.zip
gcc-148597b92e4ddb95ddcd53cbfad000845f831474.tar.gz
gcc-148597b92e4ddb95ddcd53cbfad000845f831474.tar.bz2
(macroexpand): Treat `foo ( )' as 0 args if foo wants 0 args.
From-SVN: r4323
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cccp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 26f976a..48e3bf4 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -7067,7 +7067,10 @@ macroexpand (hp, op)
if (i == 1) {
register U_CHAR *bp = args[0].raw;
register U_CHAR *lim = bp + args[0].raw_length;
- while (bp != lim && is_space[*bp]) bp++;
+ /* cpp.texi says for foo ( ) we provide one argument.
+ However, if foo wants just 0 arguments, treat this as 0. */
+ if (nargs == 0)
+ while (bp != lim && is_space[*bp]) bp++;
if (bp == lim)
i = 0;
}