This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Thu, 15 Dec 2005, Nathan Sidwell wrote:
Richard Guenther wrote:
Recently the following warning was introduced, which triggers in cases where it doesn't make any difference if its packed or not, like
/usr/src/linux/include/asm/mpspec_def.h: [...] 74 struct mpc_config_bus 75 { 76 unsigned char mpc_type; 77 unsigned char mpc_busid; 78 unsigned char mpc_bustype[6] __attribute((packed)); 79 };
The following patch changes the logic to only warn if we try to pack things that have type alignment smaller than BITS_PER_UNIT.
Are there such types? Are there systems where the alignment of array of Foo is greater than plain Foo? (I.e. are there systems where the above attribute does something?)
I doubt it. But 6.7.2.1/12 doesn't tell anything special about array members, so it might be aligned differently and still be standard conformant.
-- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |