This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sizeof bool > sizeof int ?!?
- To: EGCS mailing list <egcs at cygnus dot com>
- Subject: Re: sizeof bool > sizeof int ?!?
- From: Richard Hadsell <hadsell at blueskystudios dot com>
- Date: Thu, 20 Aug 1998 12:04:47 -0400
- Organization: Blue Sky | VIFX
- References: <1083.490T1577T7154237@kampsax.k-net.dk> <35A0EDDC.167E@blueskystudios.com> <35D36C50.52BF@blueskystudios.com>
Richard Hadsell wrote:
>
> > I realize that some (all?) alpha processors do not handle 1-byte data
> > efficiently. I hope that the situation will change with future
> > versions. But it's hard to believe that alphas don't have an efficient
> > instruction set for (4-byte) int data. What about short data? Are they
> > handled as badly as 1-byte data?
> >
> > I would prefer that bool be implemented with the best performance in
> > mind, including the effects of using memory efficiently, too.
>
> I haven't seen any comments from the compiler group on their decision to
> implement bool as an 8-byte datum on alphas. If the performance is so
> much better that it is worth the cost in memory usage, why is an int
> only 4 bytes. Since the standard allows it to be as big as a long, why
> not? I thought that we could expect an int to be whatever size gives
> the best integer performance.
>
> So I don't understand why a bool is any longer than an int. What other
> considerations were there in making the decision?
Comments anyone ?
--
Dick Hadsell 914-381-8400 x5446 Fax: 914-381-9790
Reply-to: hadsell@blueskystudios.com
Blue Sky | VIFX http://www.bluesky-vifx.com
1 South Road, Harrison, NY 10528