https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121180
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
struct Empty { };
struct S : Empty { char buf[1]; };
int main()
{
S s;
new (s.buf) Empty;
}
Isn't this exactly the same?
redi at gcc dot gnu.org via Gcc-bugs Sun, 20 Jul 2025 02:51:48 -0700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121180
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
struct Empty { };
struct S : Empty { char buf[1]; };
int main()
{
S s;
new (s.buf) Empty;
}
Isn't this exactly the same?