This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Remove TRUE and FALSE
- To: "Zack Weinberg" <zackw at stanford dot edu>
- Subject: Re: Remove TRUE and FALSE
- From: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Date: Tue, 27 Feb 2001 17:41:28 +1100
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20010226213746.D14513@wolery.stanford.edu>
On 26-Feb-2001, Zack Weinberg <zackw@stanford.edu> 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 <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.