Subject: Re: stdbool.h compatibility with gcc 2.x
To: Julio M. Merino Vidal <email@example.com>
From: David Laight <firstname.lastname@example.org>
Date: 09/30/2005 20:46:40
On Fri, Sep 30, 2005 at 04:51:54PM +0200, Julio M. Merino Vidal wrote:
> So, I'm wondering... could it be silly to provide a "fake" stdbool.h header
> that uses an integer type to define the boolean type in those platforms
> that don't have it (i.e., HAVE_GCC3=no)? Should be trivial to do.
You can't do that, IIRC the stuff in stdbool.h cannot be done without
support from the compiler itself.
Indeed the fact that the variables have to read as 0 (if 0) and 1 (if non-zero)
is an overhead you don't necessarily want in any code.
David Laight: email@example.com