OSDN Git Service

Provide support for empty arguments in macro invocations.
authorCarl Worth <cworth@cworth.org>
Thu, 27 May 2010 20:29:19 +0000 (13:29 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 27 May 2010 20:29:19 +0000 (13:29 -0700)
commita19297b26e971e5a9dbe00b4254931505da4b5a9
tree81441fe0327023a2af8d679d9e5fe2f0f4c867b0
parenta65cf7b1d29e98ef3bf31051df8a06cb394d131f
Provide support for empty arguments in macro invocations.

For this we always add a new argument to the argument list as soon as
possible, without waiting until we see some argument token. This does
mean we need to take some extra care when comparing the number of
arguments with the number of expected arguments. In addition to
matching numbers, we also support one (empty) argument when zero
arguments are expected.

Add a test case here for this, which does pass.
glcpp-parse.y
tests/057-empty-arguments.c [new file with mode: 0644]