• 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: Tue, 15 Nov 2005 10:01:40 -0800

Assuming you mean the following, it does not work. I still get a 4 byte enum:

#pragma options align=mac68k
typedef enum
{
	foo		= 0x10
} fooEnum;
#pragma options align=reset

So, is gcc 4 busted in regards to __packed__ and enums, or am I doing something wrong?

Dave

On Nov 15, 2005, at 9:49 AM, Alexander von Below wrote:

Or use:

#pragma options align=mac68k

http://gcc.gnu.org/onlinedocs/gcc/Darwin-Pragmas.html

Am 15.11.2005 um 18:44 schrieb Mark Wagner:

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).

--- The path of least resistance, it's not just for electricity any more.

_______________________________________________
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: Dave Rehring <email@hidden>
References: 
 >[2.2] Cant get __attribute__ ((__packed__)) to work (From: Dave Camp <email@hidden>)
 >Re: [2.2] Cant get __attribute__ ((__packed__)) to work (From: Mark Wagner <email@hidden>)
 >Re: [2.2] Cant get __attribute__ ((__packed__)) to work (From: Alexander von Below <email@hidden>)

  • Prev by Date: Re: Getting the most out of ADC docs
  • Next by Date: Re: Breakpoints that never go away
  • 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