This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53037] warn_if_not_aligned(X)
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Apr 2012 15:47:14 +0000
- Subject: [Bug c/53037] warn_if_not_aligned(X)
- Auto-submitted: auto-generated
- References: <bug-53037-4@http.gcc.gnu.org/bugzilla/>
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.