This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: stdbool.h should be compatible with C++


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]