OSDN Git Service

Fix #if-skipping to *really* skip the skipped group.
authorCarl Worth <cworth@cworth.org>
Tue, 1 Jun 2010 18:20:18 +0000 (11:20 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 1 Jun 2010 18:23:08 +0000 (11:23 -0700)
commita771a40e2257657cbdae0eb97a7bb8733db76b91
tree363998c5e734aea3fc40d4fff94bcf5d2646479b
parent96d3994881832201db7edd8a0a6f4b34655649d3
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.
glcpp-lex.l
glcpp-parse.y
glcpp.h
tests/062-if-0-skips-garbage.c [new file with mode: 0644]