https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96946

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Libc++ seems to pass the std::list example in comment 3 because they rely on
different UB: https://godbolt.org/z/xvdaxh

The libc++ std::list node is allocated as though it's raw storage, and so is
never constructed. That means they don't need to cast from raw bytes to a T*,
because they just take the address of a T subobject inside an object which
doesn't exist.

Reply via email to