From a771a40e2257657cbdae0eb97a7bb8733db76b91 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 1 Jun 2010 11:20:18 -0700 Subject: Fix #if-skipping to *really* skip the skipped group. Previously we were avoiding printing within a skipped group, but we were still evluating directives such as #define and #undef and still emitting diagnostics for things such as macro calls with the wrong number of arguments. Add a test for this and fix it with a high-priority rule in the lexer that consumes the skipped content. --- tests/062-if-0-skips-garbage.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/062-if-0-skips-garbage.c (limited to 'tests') diff --git a/tests/062-if-0-skips-garbage.c b/tests/062-if-0-skips-garbage.c new file mode 100644 index 0000000000..d9e439bb89 --- /dev/null +++ b/tests/062-if-0-skips-garbage.c @@ -0,0 +1,5 @@ +#define foo(a,b) +#if 0 +foo(bar) +foo( +#endif -- cgit v1.2.3