This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: typedef char bool;
- To: Martine dot BrahamMoses at ca dot com
- Subject: Re: typedef char bool;
- From: Mo McKinlay <mmckinlay at labs dot interopen dot org>
- Date: Sat, 11 Mar 2000 00:26:54 +0000 (GMT)
- cc: gcc-bugs at gcc dot gnu dot org
# Also, asking to turn it off sounds strange; you might just as well ask
# to turn-off 'template', or 'class', or 'while'.
One would've thought that the easiest solution was to remove the typedef,
and allowing the compiler to use the builtin bool type. (And any #define
{true|false} statements, too). It would be somewhat easier than modifying
g++.
Another solution (less preferred) would be to:
typedef char xbool;
#define bool xbool
Thus forcing your routines to use 'xbool', although I'd only do this if
your routines store something other than true or false in bool types. If
they do, you don't want a boolean type at all :-)
I agree with Martin's view that the code is at fault, and not g++:
removing bool is like trying to remove int - you just don't do it (at
least, you shouldn't - the portability implications of this are not to be
sneezed at).
HTH,
--
Mo McKinlay T: +44 (0) 709 22 55 05 x1
Chief Software Architect F: +44 (0) 709 22 55 05 x3
inter/open E: mmckinlay@labs.interopen.org
A division of Bekon Marketing Limited W: http://www.interopen.org