[Bug c++/87521] [C++][ABI] Tail padding not reused for non POD struct with defaulted/deleted special member function as per Itanium ABI on x86-64

2018-11-16 Thread redi at gcc dot gnu.org
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

[Bug c++/87521] [C++][ABI] Tail padding not reused for non POD struct with defaulted/deleted special member function as per Itanium ABI on x86-64

2018-11-16 Thread redi at gcc dot gnu.org
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

[Bug c++/87521] [C++][ABI] Tail padding not reused for non POD struct with defaulted/deleted special member function as per Itanium ABI on x86-64

2018-11-15 Thread foom at fuhm dot net
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

[Bug c++/87521] [C++][ABI] Tail padding not reused for non POD struct with defaulted/deleted special member function as per Itanium ABI on x86-64

2018-11-14 Thread bruno.bugs.contact at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87521 Bruno Bugs changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/87521] [C++][ABI] Tail padding not reused for non POD struct with defaulted/deleted special member function as per Itanium ABI on x86-64

2018-11-14 Thread redi at gcc dot gnu.org
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

[Bug c++/87521] [C++][ABI] Tail padding not reused for non POD struct with defaulted/deleted special member function as per Itanium ABI on x86-64

2018-11-14 Thread redi at gcc dot gnu.org
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.

[Bug c++/87521] [C++][ABI] Tail padding not reused for non POD struct with defaulted/deleted special member function as per Itanium ABI on x86-64

2018-11-14 Thread redi at gcc dot gnu.org
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