http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53037
Bug #: 53037
Summary: warn_if_not_aligned(X)
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: [email protected]
ReportedBy: [email protected]
What I'd like to have is an __attribute__((warn_if_not_aligned(X)))
which issues a warning if the object/type/field in question is not
aligned to X. In particular, I'd like to build with:
typedef unsigned long long __u64
__attribute__((aligned(4),warn_if_not_aligned(8)));
... in order to get a list of the places where we have misaligned 64-bit
data pieces in x86. Then we can do Linus' requested cleanups which
ultimately aims to getting __u64 to be __attribute__((aligned(8))) even
on i386, with an explicit __compat_u64 for the places where we need to
be misaligned for legacy reasons.