C++ PATCH for c++/65945 (nullptr_t alignment)

Jason Merrill jason@redhat.com
Wed Jul 1 17:09:00 GMT 2015


It's trivial to fix the alignment of nullptr_t, but I was concerned 
about ABI impact.  On further research it seems that it won't cause any 
trouble with argument alignment, since that doesn't seem to rely on 
TYPE_ALIGN at all; I think the only ABI breakage would come from 
unaligned nullptr_t fields in classes, which I expect to be very rare. 
The testcases that were breaking on SPARC and ARM without this fix have 
to do with local stack slots, which are not part of an interface.

Activating the warning requires passing an explicit version number to 
-Wabi, e.g. -Wabi=8.

Tested x86_64-pc-linux-gnu, applying to trunk and 5.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 65945.patch
Type: text/x-patch
Size: 4510 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150701/075843f8/attachment.bin>


More information about the Gcc-patches mailing list