https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87521
--- Comment #7 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #6)
> Yes, on IRC Bruno already pointed out the problem with the comment 3
> example. That doesn't change my mind, I still think it would be madness for
> an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87521
--- Comment #6 from Jonathan Wakely ---
Yes, on IRC Bruno already pointed out the problem with the comment 3 example.
That doesn't change my mind, I still think it would be madness for an
defaulted-on-first-declaration trivial destructor to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87521
James Y Knight changed:
What|Removed |Added
CC||foom at fuhm dot net
--- Comment #5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87521
Bruno Bugs changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87521
--- Comment #3 from Jonathan Wakely ---
What really matters here is triviality of the destructor, and that isn't
affected by the user-declared defaulted dtor.
Clang fails this test, because memcpy overwrites the tail padding:
#include
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87521
--- Comment #2 from Jonathan Wakely ---
The C++03 definition of POD struct (which is what matters for the ABI) requires
that it has no user-defined destructor.
Your type has a user-declared destructor, which is implicitly-defined when
odr-used.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87521
--- Comment #1 from Jonathan Wakely ---
The meaning of "user-declared" in C++03 is closer to "has a function body" than
the meaning in C++11, where it includes defaulted definitions.
A defaulted definition in C++11 is equivalent to an implicit