This is the mail archive of the gcc-bugs@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]

[Bug target/23071] Darwin alignment ignores "attribute packed" for first 'double' element of a struct



------- Comment #8 from mikestump at comcast dot net  2010-03-22 23:18 -------
The previous behavior was fairly broken, adding packed, _increased_ the
alignment.  A user that adds packing, never wants more alignment:

struct Test {
  double D  __attribute__((packed,aligned(4)));
  short X;
} x;

struct {
  char x;
  struct Test t;
} b = { 1, { 2, 3}};

compared to:

struct Test {
  double D /*  __attribute__((packed,aligned(4))) */;
  short X;
} x;

struct {
  char x;
  struct Test t;
} b = { 1, { 2, 3}};


-- 

mikestump at comcast dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikestump at comcast dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23071


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]