This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Remove TRUE and FALSE

On 26-Feb-2001, Zack Weinberg <> wrote:
> Most of GCC uses 1 and 0 for truth values, but there are a number of
> places where it uses TRUE and FALSE.  This patch changes all of them
> to use 1 and 0 instead.  This permits us to remove the definitions of
> TRUE and FALSE from several dozen xm-<host>.h files.
> I'm ambivalent about the change.  On the one hand, it is consistent
> with the rest of the compiler.  On the other, I do feel that use of
> TRUE and FALSE provides information to readers which 1 and 0 don't.
> On the third hand, if we want to keep them, we ought to be moving
> toward <stdbool.h> [or fake thereof] anyway.

I'm opposed to the change, for the reason that you give above.
In the long term, I'd like the rest of the compiler to change
from using 0 and 1.  Of course this would be a lot of work
(and I'm not volunteering), but I'd prefer inconsistent use of 1/0
in some parts and true/false in others to using 1/0 everywhere.
The parts which use 1/0 will still have the same information
as now, and the parts using true/false will be easier to read.

I agree that <stdbool.h> (with autoconf'd replacement if need be)
would be a nice thing to move to.

Fergus Henderson <>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <>  |     -- the last words of T. S. Garp.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]