Re: Why are BOOL and bool distinct types?
Re: Why are BOOL and bool distinct types?
- Subject: Re: Why are BOOL and bool distinct types?
- From: "Sean McBride" <email@hidden>
- Date: Wed, 8 Jun 2005 11:04:59 -0400
- Organization: Rogue Research
On 2005-06-08 07:54, Todd Blanchard said:
>> bool is 32 bits on ppc and 8 bits on i386.
>
>That sounds like a fairly stupid decision by the compiler writers.
>Since Apple maintains the ObjectiveC part of the compiler and
>contributes fixes, I'd think this would be something they could see
>fixed up, then change the typedef.
It's really no different that say 'int' being 32 bits on some machines/
compilers and 64 bit on others. Maybe the PPC can read 32 bits faster
than 8 bits, so using 32 for a bool is faster. Maybe that's not the
case on other hardware.
If you need a type of an exact size, use the ones in stdint.h or MacTypes.h.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden