Subject: Re: #pragma pack parameter ?
To: None <hm@hcswork.hcs.de>
From: Charles M. Hannum <mycroft@ai.mit.edu>
List: port-i386
Date: 04/11/1995 13:35:10
   Pragma pack seems to be the solution for this type of stuff, but i
   can't find docs for the parmeter x in #pragma pack(x).

It's not really documented in the GCC manual.  Basically, it emulates
the old SysV behavior of `#pragma pack(x)', which is that the compiler
starts doing structure packing to x-byte boundaries, rather than the
default (4 on an i386).

GCC 2.6 has another solution to this, which is to tag all the affected
members with `__attribute__((packed(x)))', but if you consider the
previous bogus, this is no less so.

What would be nice is something like:

struct foo __attribute__((packed(1))) {
	char blah;
	short phooey;
	long hohum;
};

but as far as I know, GCC doesn't currently do that.