Correct fix for stdbool?

Andrew Cagney ac131313@cygnus.com
Thu Feb 7 19:13:00 GMT 2002


> 
> I think we should remove the identifiers boolean, true, and false from
> bfd.h.  Within bfd.h, we should replace boolean with bfd_boolean.  I
> think bfd_boolean should be typedef to int.  We can define bfd_true
> and bfd_false if we want to, but it really doesn't matter.


BTW, bfd_false and bfd_true are functions ....


> Code which uses bfd.h will then have to change.  The simple change for
> the binutils is to define boolean, true and false in an internal
> header file.  That header file can include <stdbool.h> if it exists,
> and define boolean in terms of bool.
> 
> gdb will also have to change, as it uses true and false in a few
> places.  This change to bfd.h may also break any other existing users.


Fortunatly not that many.

Andrew





More information about the Binutils mailing list