aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2002-09-20 19:44:09 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-09-20 19:44:09 +0000
commit56941bf2e33e6d5b6f2c9015575b2fcf44131629 (patch)
treea172815d8a262a6580139d5d5ff77104790cee2b /gcc/cppmacro.c
parent66a0dfebeb72645cdabc9661b7cdf2567be23d2a (diff)
downloadgcc-56941bf2e33e6d5b6f2c9015575b2fcf44131629.zip
gcc-56941bf2e33e6d5b6f2c9015575b2fcf44131629.tar.gz
gcc-56941bf2e33e6d5b6f2c9015575b2fcf44131629.tar.bz2
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
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c7
1 files changed, 7 insertions, 0 deletions
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