This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/65945] C++ alignment of nullptr_t is 1 and might cause unaligned stores to the frame
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Jul 2015 17:59:50 +0000
- Subject: [Bug c++/65945] C++ alignment of nullptr_t is 1 and might cause unaligned stores to the frame
- Auto-submitted: auto-generated
- References: <bug-65945-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65945
--- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Jul 1 17:59:19 2015
New Revision: 225270
URL: https://gcc.gnu.org/viewcvs?rev=225270&root=gcc&view=rev
Log:
PR c++/65945
* decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
* class.c (layout_nonempty_base_or_field): Warn if that affects
the offset of a field.
Added:
trunk/gcc/testsuite/g++.dg/abi/nullptr-align.C
trunk/gcc/testsuite/g++.dg/abi/nullptr-align2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/decl.c