This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bool
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: bool
- From: John Carr <jfc at mit dot edu>
- Date: Wed, 12 Nov 1997 08:59:40 EST
- Cc: bothner at cygnus dot com (Per Bothner), egcs at cygnus dot com
> Basically, this is a space/time tradeoff, and there is no right answer. My
> opinion is that time is more important. And in any case bool has been 4
> bytes on RISC targets for the past couple of years, and I don't think it's
> worth changing it now.
Whatever is decided, no changes should be made until the next time we
break binary compatibility. It is too late in the release cycle to
change bool now.
bool should be a type which can be loaded with a single instruction.
That means at least 32 bits on Alpha. On other machines (except
possibly DSPs) I don't think size matters. I don't expect it to be
any particular size. If it becomes a char, make it unsigned because
gcc is bad at optimizing out sign/zero extension and signed char is on
average slightly slower than unsigned.