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/54188] Inconsistent __alignof__(long long)


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

--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-08-08 21:43:18 UTC ---
On Wed, 8 Aug 2012, rth at gcc dot gnu.org wrote:

> > N1370 (C11 draft) 6.5.3.4 paragraph 3 says:
> > 
> >     The _Alignof operator yields the alignment requirement of its
> >     operand type.
> 
> Does that imply that an i386 host should return 1 for most types,
> simply because it *can* allow unaligned accesses?

Alignment requirements are defined in terms of "addresses at which objects 
of that type may be allocated", not in terms of what might happen with a 
pointer dereference.


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