From 148597b92e4ddb95ddcd53cbfad000845f831474 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Tue, 4 May 1993 16:43:42 +0000 Subject: [PATCH] (macroexpand): Treat `foo ( )' as 0 args if foo wants 0 args. From-SVN: r4323 --- gcc/cccp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/cccp.c b/gcc/cccp.c index 26f976a117b..48e3bf45f8c 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; } -- 2.30.2