This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: stdbool.h should be compatible with C++
- To: bug-gcc at gnu dot org, gcc-patches at gcc dot gnu dot org, martin at xemacs dot org
- Subject: Re: Patch: stdbool.h should be compatible with C++
- From: Mike Stump <mrs at windriver dot com>
- Date: Mon, 6 Dec 1999 12:04:04 -0800 (PST)
> Date: Sun, 5 Dec 1999 15:38:20 -0800 (PST)
> From: Martin Buchholz <martin@xemacs.org>
> To: bug-gcc@gnu.org, gcc-patches@gcc.gnu.org
> As I pointed out in my other bug report re: stdbool.h,
> #define true true
> is overly tricky and appears to be buggy.
> #define true 1
> is clearer and Just Works.
Unfortunately, it doesn't. The type of true and false are bool. The
type of 1 isn't bool. ((bool)1) is a better approximation for true
than 1. But even ((bool)1) I worry isn't quite the same as true.