https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111771
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111771
--- Comment #4 from Richard Biener ---
-fno-lifetime-dse fixes the issue (and the diagnostic)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111771
Richard Biener changed:
What|Removed |Added
Ever confirmed|0 |1
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111771
--- Comment #2 from Egor ---
Before calling A's constructor, it will zero `x` anyway.
I was also surprised when I learned this yesterday, but it's what the standard
says.
1. `()` performs value-initialization on B:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111771
--- Comment #1 from Andrew Pinski ---
Did you miss that the implicit B constructor will just call A's constructor ?