bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's behind this fix?


From: Paul Eggert
Subject: Re: What's behind this fix?
Date: Mon, 04 Oct 2010 11:08:46 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8

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>.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]