diff options
author | Carl Worth <cworth@cworth.org> | 2010-06-01 11:20:18 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-06-01 11:23:08 -0700 |
commit | a771a40e2257657cbdae0eb97a7bb8733db76b91 (patch) | |
tree | 363998c5e734aea3fc40d4fff94bcf5d2646479b /tests | |
parent | 96d3994881832201db7edd8a0a6f4b34655649d3 (diff) |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/062-if-0-skips-garbage.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 |