[cxx-abi-dev] What is alignof(decltype(nullptr))?

Richard Smith richardsmith at google.com
Thu Apr 23 18:35:55 UTC 2015


The C++ standard requires that sizeof(nullptr) == sizeof(void*) (presumably
to support programs that use sizeof(NULL) for some purpose) but does not
appear to place any requirements on alignof(decltype(nullptr)). This
clearly needs to be part of the ABI, and current implementations of the
Itanium C++ ABI differ: Clang and EDG use alignof(void*). GCC uses 1.

We should pick a value and specify it in the ABI. alignof(void*) seems like
a better answer to me. Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20150423/7a26c5a0/attachment.html>


More information about the cxx-abi-dev mailing list