[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-10-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993 Andrew Pinski changed: What|Removed |Added CC||iamsupermouse at mail dot ru ---

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread m.cencora at gmail dot com via Gcc-bugs
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.

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread redi at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread redi at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread m.cencora at gmail dot com via Gcc-bugs
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

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread m.cencora at gmail dot com via Gcc-bugs
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

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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 ...

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-20 Thread panigstein at hotmail dot com via Gcc-bugs
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) > > > >

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-20 Thread panigstein at hotmail dot com via Gcc-bugs
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,

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-20 Thread redi at gcc dot gnu.org via Gcc-bugs
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,

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-20 Thread redi at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-20 Thread redi at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-19 Thread panigstein at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993 panigstein at hotmail dot com changed: What|Removed |Added CC||panigstein at hotmail

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-03-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993 Andrew Pinski changed: What|Removed |Added Keywords||wrong-code --- Comment #1 from Andrew