diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-20 19:44:09 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-20 19:44:09 +0000 |
commit | dbb7d6f7169c9b258895092bac266bb96c554774 (patch) | |
tree | a172815d8a262a6580139d5d5ff77104790cee2b /gcc/cppmacro.c | |
parent | 0721ab49d5f79b88aece5c3538e76841d0bee06f (diff) | |
download | gcc-dbb7d6f7169c9b258895092bac266bb96c554774.tar.gz |
* cppmacro.c: Don't warn about function-like macros without
'(' during pre-expandion.
testsuite:
* gcc.dg/cpp/tr-warn2.c: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index ead48f6429c..961109ad100 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 |