https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
Andrew Pinski changed:
What|Removed |Added
CC||iamsupermouse at mail dot ru
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #14 from m.cencora at gmail dot com ---
Yeah, in CWG issue comments it is much more clear - but I cannot find such a
wording in C++ latest draft.
English is not my native language so this one is on me.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #13 from Jonathan Wakely ---
And that's clearly the committee's intent:
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#302
"Zero the object, then call the default generated constructor" ... "Zero first,
and generate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #12 from Jonathan Wakely ---
I don't see any ambiguity:
"otherwise, the object is zero-initialized and the semantic constraints for
default-initialization are checked, **and** if T has a non-trivial default
constructor, the object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #11 from m.cencora at gmail dot com ---
Nvm, I understood this rule differently. You are saying that initialization is
two step:
- first zero-initialized,
- then default-initialized.
For me the way this rule is written is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
m.cencora at gmail dot com changed:
What|Removed |Added
CC||m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Ever confirmed|0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #8 from Andrew Pinski ---
(In reply to Pablo Anigstein from comment #7)
> Here is an updated example: https://godbolt.org/z/YePjhxKE4.
I don't see an updated example, all I see is an URL ...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #7 from Pablo Anigstein ---
(In reply to Jonathan Wakely from comment #5)
> (In reply to Jonathan Wakely from comment #3)
> > (In reply to Pablo Anigstein from comment #2)
> > > (In reply to Andrew Pinski from comment #1)
> > > >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #6 from Pablo Anigstein ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Pablo Anigstein from comment #2)
> > (In reply to Andrew Pinski from comment #1)
> > > Hmm,
> > > I noticed that since GCC 7 with -std=c++17,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #5 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Pablo Anigstein from comment #2)
> > (In reply to Andrew Pinski from comment #1)
> > > Hmm,
> > > I noticed that since GCC 7 with -std=c++17,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #4 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #3)
> Derived is an aggregate since C++17.
Correction, it's an aggregate *only* in C++17. In C++20 the rule changed again
so the user-declared (but not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
--- Comment #3 from Jonathan Wakely ---
(In reply to Pablo Anigstein from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > Hmm,
> > I noticed that since GCC 7 with -std=c++17, the b.x is not initialized at
> > all. So the question
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
panigstein at hotmail dot com changed:
What|Removed |Added
CC||panigstein at hotmail
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993
Andrew Pinski changed:
What|Removed |Added
Keywords||wrong-code
--- Comment #1 from Andrew
15 matches
Mail list logo