On 10/04/10 00:33, Paul Hilfinger wrote: > Is this new? My copy of ISO 9899:1999
Yes, it's new. Sorry, I should have made it clear that I was referring to C89, which doesn't allow empty macro arguments. Bison is supposed to be portable to C89. The rules for empty arguments in C99 are a bit confusing, as you've noted, and code that explores the corners is likely to expose spiderwebs in various implementations. That being said, it's pretty clear that "#define foo() etc" is OK: for example, it's in one of the C99 examples. It was also OK in C89, and this reflected common practice in macro calls, e.g., getchar(). The topic is further discussed in pages 102-103 of the rationale <http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf>.
