aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/macro7.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-03-03 22:14:08 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-03-03 22:14:08 +0000
commite8408f251a70640dcc208877ef3122efd5b7e824 (patch)
tree7dc28de2225965477d01df8a6de99ec5755e2829 /gcc/testsuite/gcc.dg/cpp/macro7.c
parent20f9202d81c1a89a0cb65a6ef260101a8ee8822b (diff)
downloadgcc-e8408f251a70640dcc208877ef3122efd5b7e824.zip
gcc-e8408f251a70640dcc208877ef3122efd5b7e824.tar.gz
gcc-e8408f251a70640dcc208877ef3122efd5b7e824.tar.bz2
cpplex.c (_cpp_lex_token): Don't warn about directives in macro arguments when looking for the '('.
* cpplex.c (_cpp_lex_token): Don't warn about directives in macro arguments when looking for the '('. * cppmacro.c (funlike_invocation_p): Set parsing_args to 2 when really parsing arguments; 1 when looking for '('. Always restore the lexer position. * gcc.dg/cpp/cppmacro7.c: New test. From-SVN: r40223
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/macro7.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro7.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/macro7.c b/gcc/testsuite/gcc.dg/cpp/macro7.c
new file mode 100644
index 0000000..6f2c67c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/macro7.c
@@ -0,0 +1,10 @@
+/* { dg-do preprocess } */
+
+/* Test we don't complain about directives in macro expansions when
+ looking for the '(' of a function-like macro.
+
+ Submitter: Neil Booth. 3 Mar 2000. */
+
+#define f(x) x
+f
+#define g