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

Dennis Handly dhandly at cup.hp.com
Fri Apr 24 02:51:39 UTC 2015


>From: Richard Smith <richardsmith at google.com>
>but does not appear to place any requirements on alignof(decltype(nullptr)).
>Itanium C++ ABI differ: Clang and EDG use alignof(void*). GCC uses 1.

Was this intentional or just an oversight, confusing the alignment of the
pointer vs what it points to?

>alignof(void*) seems like a better answer to me. Thoughts?

Yes, all pointers should be aligned the same.  Unless there is short vs
far, types.


More information about the cxx-abi-dev mailing list