This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69560] x86_64: alignof(uint64_t) produces incorrect results with -m32
- 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: Wed, 11 Apr 2018 03:36:25 +0000
- Subject: [Bug c++/69560] x86_64: alignof(uint64_t) produces incorrect results with -m32
- Auto-submitted: auto-generated
- References: <bug-69560-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69560
--- Comment #18 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jason Merrill from comment #16)
> (In reply to Andreas Schwab from comment #15)
> > Because the ABI says so.
>
> Which ABI? In https://www.uclibc.org/docs/psABI-i386.pdf I see
>
> long long: sizeof 8, alignment 4.
>
> That GCC chooses to give stronger alignment to long long variables isn't
> part of the ABI, and shouldn't affect the value of alignof.
FYI, x86 psABIs are at
https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI