Add test (and fix) for a function argument of a macro that expands with a comma.

The fix here is quite simple (and actually only deletes code). When
expanding a macro, we don't return a ',' as a unique token type, but
simply let it fall through to the generic case.
This commit is contained in:
Carl Worth 2010-05-20 12:06:33 -07:00
parent 9f3d2c4e3d
commit 805ea6afe6
2 changed files with 3 additions and 2 deletions

View file

@ -779,8 +779,6 @@ glcpp_parser_lex (glcpp_parser_t *parser)
return '(';
else if (strcmp (replacements->value, ")") == 0)
return ')';
else if (strcmp (replacements->value, ",") == 0)
return ',';
yylval.str = xtalloc_strdup (parser, replacements->value);

View file

@ -0,0 +1,3 @@
#define foo(a) (a)
#define bar two,words
foo(bar)