[Top][All Lists]

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

Re: [PATCH] gettext: do not assume '#define ... defined ...' behavior

From: Paul Eggert
Subject: Re: [PATCH] gettext: do not assume '#define ... defined ...' behavior
Date: Thu, 12 Jul 2012 08:31:48 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 07/12/2012 03:15 AM, Bruno Haible wrote:
> I tried it and was surprised to see that all compilers support it.

I expect the problem is what happens when you do something
like this:

#define FOO BAR
#define BAR -0
#define def defined
#define X def FOO
#if X

Does this test where FOO is defined, or BAR?  Or maybe it
tests neither and just evaluates 0 - 0?  My guess is that
the C standardization committee looked at stuff like this
and said, "Who cares?  Don't do any of that."

Anyway, thanks, I pushed the change.  The VMS compiler is the
first one I've seen warn about this.

reply via email to

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