Strange CPP failures

Zack Weinberg
Wed Jul 17 02:08:00 GMT 2002

On Tue, Jul 16, 2002 at 10:27:07PM +0100, Joseph S. Myers wrote:
> On Tue, 16 Jul 2002, Neil Booth wrote:
> > Joseph - what to do about this?  I don't think adding "!= 0"
> > is a good fix - the typedef to char is fundamentally broken.
> > I don't see how a typedef to anything can really work in these
> > cases.
> The work to use bool in GCC is Zack's, but I'd suppose the portability
> requirement on assignments to bool needs documenting in
> README.Portability.  I'd considered it obvious (no-one's suggested 
> allowing use of C99 features in GCC yet) that uses of bool in GCC need to 
> allow for it being either a "traditional" bool type (as in curses etc.) or 
> a C99 _Bool.

Agreed.  I don't think there's anything else practical.

Suggest we use !!(var & 4096) instead of (var & 4096) != 0, and
document that as the preferred idiom.


More information about the Gcc-bugs mailing list