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++/65945] C++ alignment of nullptr_t is 1 and might cause unaligned stores to the frame


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


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