• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [2.2] Cant get __attribute__ ((__packed__)) to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: [2.2] Cant get __attribute__ ((__packed__)) to work
      • From: Steve Checkoway <email@hidden>
References: 
 >Re: [2.2] Cant get __attribute__ ((__packed__)) to work (From: Dave Rehring <email@hidden>)
 >Re: [2.2] Cant get __attribute__ ((__packed__)) to work (From: Chris Espinosa <email@hidden>)
 >Re: [2.2] Cant get __attribute__ ((__packed__)) to work (From: Dave Camp <email@hidden>)
 >Re: [2.2] Cant get __attribute__ ((__packed__)) to work (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Simple Icon Composer Question
  • Next by Date: Re: debugging exceptions!
  • Previous by thread: Re: [2.2] Cant get __attribute__ ((__packed__)) to work
  • Next by thread: Re: [2.2] Cant get __attribute__ ((__packed__)) to work
  • Index(es):
    • Date
    • Thread