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 c/53037] warn_if_not_aligned(X)


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

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-04-19 15:47:14 UTC ---
Given

typedef unsigned long long __u64 __attribute__((aligned(4)));

all most all __u64 will be aligned at 4.   The only case we may
do something about is

typedef unsigned long long __u64
__attribute__((aligned(4),warn_if_not_aligned(8)));

struct foo
{
  int i1;
  int i2;
  int i3;

  __u64 x;
};

since alignment of the x field also depends on alignment of
struct foo.


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