Re: [2.2] Cant get __attribute__ ((__packed__)) to work
Re: [2.2] Cant get __attribute__ ((__packed__)) to work
- Subject: Re: [2.2] Cant get __attribute__ ((__packed__)) to work
- From: Mark Wagner <email@hidden>
- Date: Tue, 15 Nov 2005 09:44:59 -0800
On 11/14/05, Dave Camp <email@hidden> wrote:
> I'm updating some old code that was last built with Project Builder
> and gcc 2.95. I've got some enums that need to be 1 byte, not an int
> (the typedefs are used in structs that are sent to a device over USB).
Try this:
typedef char fooEnum;
typedef enum
{
foo = 0x10
} _fooEnum;
int main (int argc, const char * argv[])
{
fooEnum myFoo = foo;
printf("size = %d", sizeof(fooEnum));
return 0;
}
--
Mark Wagner
_______________________________________________
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