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: Dave Camp <email@hidden>
- Date: Mon, 21 Nov 2005 14:19:17 -0800
I was trying gcc 4.0.1 (this was going to be an Intel port). That
code did work in 2.95, and the 4.0 docs indicate it should work on
typedef'd enums. In any event, it sounds like it doesn't work now,
so I'll have to recode.
I don't quite follow you; my test above on gcc 4.0.1 did work.
Could you try that code snippet on your configuration?
That was one of my early tests and it doesn't even compile. Here is
my test code:
typedef enum __attribute__ ((__packed__))
{
foo = 0x10
} fooEnum;
class whatever
{
public:
fooEnum blahblah(void) const;
};
int main (int argc, const char * argv[])
{
fooEnum foo;
printf("size = %d", sizeof(foo));
return 0;
}
error: expected identifier before '{' token
error: expected unqualified-id before '{' token
error: expected constructor, destructor, or type conversion before
';' token
I'm using Xcode 2.2 and I made a test project for a standard
CoreFoundation tool. The main file is a .cpp file.
Dave
---
It's not denial. I'm just very particular about the reality I choose
to accept. -Calvin
_______________________________________________
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