[Bug c++/65945] C++ alignment of nullptr_t is 1 and might cause unaligned stores to the frame
npl at chello dot at
gcc-bugzilla@gcc.gnu.org
Thu Apr 30 13:47:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65945
--- Comment #5 from npl at chello dot at ---
making nullptr_t "similar" to void* would sound very reasonable to me. I tested
clang and it seems to behave that way.
Whatever the C++ ABI group comes up with, the unaligned accesses have to be
fixed. This was really annoying to track down, as the stores will only be
generated without optimizations - in other words I was searching for a
completely different bug.
I searched the bug database and supposedly throwing and catching nullptr`s is
something legal. So you will have to correctly align it anyway, even if its
arguable if nullptrs should ever be explicitly stored.
More information about the Gcc-bugs
mailing list