[Top][All Lists]

[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: Sun, 03 Oct 2010 16:44:50 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100915 Thunderbird/3.0.8

On 10/03/2010 03:09 PM, Paul Hilfinger wrote:

> Replacing a definition from Flex:
>   #define gram_wrap(n) 1
> which is subsequently invoked in the Flex skeleton with 
>    if ( gram_wrap( ) )
> I can't for the life of me see anything wrong with the original (Flex's) 
> definition of gram_wrap or with its use.  It certainly works on my
> version of gcc (3.4.4 on Solaris).  What gives?

It's not portable.  The C Standard says that a macro argument
cannot be empty.  In this case the parameter n would be bound
to an empty argument.  Most compilers accept this, but some do not
(otherwise I'd never have discovered that portability bug).

reply via email to

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