Re: Incorrect warning
Re: Incorrect warning
- Subject: Re: Incorrect warning
- From: Chris Espinosa <email@hidden>
- Date: Mon, 15 Nov 2004 13:39:10 -0800
On Nov 15, 2004, at 1:03 PM, Markian Hlynka wrote:
Is there a way I've forgotten about or just aren't familiar with to
make all the constants in an enum {} be unsigned? They're all defined
as 4-char codes, which I thought were naturally unsigned to begin
with.
I'd like to know the answer to that one, as I tried to do it recently,
as well as tried to make an enum short. I didn't find a way and had to
give up.
For the former, no; enums are always integral types, meaning they are
always signed. There's no provision in the language definition to
change that.
For the latter, yes, you can find it in the gcc man page (
x-man-page://1/gcc ); it's -fshort-enums. Note that because the Mac OS
X ABI takes enumerators as parameters and includes them in packed
structures, changing the size of enumerators in compilation units that
call the Mac OS X ABI will possibly crash your application.
_______________________________________________
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