Re: typedef enums are now unsigned?!
Re: typedef enums are now unsigned?!
- Subject: Re: typedef enums are now unsigned?!
- From: Jason Stephenson <email@hidden>
- Date: Sun, 08 Mar 2009 13:57:37 -0400
However, this program shows that what I just said may be inaccurate:
#include <stdio.h>
typedef enum {
Missing = 0,
Present = 1
} TestEnum;
int main (int argc, char **argv)
{
TestEnum bob;
bob = Missing;
printf("%i\n", bob);
bob = -1;
printf("%i\n", bob);
return 0;
}
When built with -arch x86_64, it prints 0, -1. Ditto when built for i386.
Jason
_______________________________________________
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