This is the mail archive of the
mailing list for the binutils project.
Re: PATCH: More stdbool tweaking
On Thu, Feb 07, 2002 at 01:55:34PM -0800, Ian Lance Taylor wrote:
> Andrew Cagney <firstname.lastname@example.org> writes:
> > > I think I need a bucket ... :-) You'll need to explictly include
> > >> "config.h" as well. Is it possible to fix bfd.h? If this is
> > >> hurting GDB it is going to hurt a lot more :-(
> > > It is not possible to fix bfd.h until we purge bool from that header
> > > entirely. It's a gross namespace issue. I'll look at that, but only
> > > post-2.12.0 release.
> > So I would strongly encourage fixing the problem before the
> > branch/release. If the problem is messing up GDB now is going to mess
> > up a lot more tools once it is made official in a release.
> > GDB's managed to survive changes far less mechanical than this one :-)
> The use of bool is not a problem, since bfd.h doesn't use bool. It
> uses boolean, which nobody appears to be complaining about.
> The only bfd.h issue is the definitions of true and false. Daniel has
> proposed a simple patch which works provided stdbool.h is included first. I
> already proposed a simple patch which should work in all cases:
> However, I have not tested it.
(Is the assumption that the first thing in an enum has value 0 always
valid? I think so, but not sure.)
In any case, your patch would not finesse the problem. False is
defined to 'false', an enum value, in <stdbool.h>. While the value
false evalutates to 0, that would not fix the problem, since it is not
I stand by my patch :)
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer