From 56941bf2e33e6d5b6f2c9015575b2fcf44131629 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Fri, 20 Sep 2002 19:44:09 +0000 Subject: cppmacro.c: Don't warn about function-like macros without '(' during pre-expandion. * cppmacro.c: Don't warn about function-like macros without '(' during pre-expandion. testsuite: * gcc.dg/cpp/tr-warn2.c: Update. From-SVN: r57366 --- gcc/cppmacro.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/cppmacro.c') diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index ead48f6..961109a 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -1032,10 +1032,15 @@ expand_arg (pfile, arg) macro_arg *arg; { unsigned int capacity; + bool saved_warn_trad; if (arg->count == 0) return; + /* Don't warn about funlike macros when pre-expanding. */ + saved_warn_trad = CPP_WTRADITIONAL (pfile); + CPP_WTRADITIONAL (pfile) = 0; + /* Loop, reading in the arguments. */ capacity = 256; arg->expanded = (const cpp_token **) @@ -1062,6 +1067,8 @@ expand_arg (pfile, arg) } _cpp_pop_context (pfile); + + CPP_WTRADITIONAL (pfile) = saved_warn_trad; } /* Pop the current context off the stack, re-enabling the macro if the -- cgit v1.1