Re: One byte bool
Re: One byte bool
- Subject: Re: One byte bool
- From: Scott Tooker <email@hidden>
- Date: Wed, 15 Mar 2006 11:16:05 -0800
On Mar 14, 2006, at 9:23 PM, Brad Oliver wrote:
On Mar 14, 2006, at 9:09 PM, email@hidden
wrote:
Warning: this setting generates code that may not binary compatible
with
code generated without this setting or with Mac OS X frameworks."
...does exist. That warning scares me. As does that typo: "may
not binary
compatible". What real issues can I expect to encounter with
this? Moving
forward, I'm not opposed to using a uint8 instead of a bool. Would
that be
a better option?
Please file a bug on the typo. The intent was to state that using 1-
byte bools could result in code that is not binary compatible with the
rest of the system. This was added specifically to support the case
that Brad is talking about (having to port code that you want to make
minimal changes too). It is not meant for general use.
On the up side, this is only an issue with PPC code (bools are 1 byte
on the intel side, AFAIK).
Scott
I've been in the same boat, porting software from Win32 and the code
is not ours to butcher. I can say that, from a practical standpoint,
the one-byte bool setting is probably not going to cause you much
grief unless you use 3rd-party libraries that are either C99 or C++
based and have bool parameters.
I can't think of any system libraries off the top of my head which
contain bool APIs - Carbon, OpenGL, OpenAL and QuickTime are all
good, for example. They all assume C89 for the API, so "bool"
doesn't even come into play. Audit the APIs for the libraries you
use to be safe, but I'd bet you're OK for the most part.
--
Brad Oliver
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden