[Bug c++/53610] C++11: constructors accept silly initializers

2020-09-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53610

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #5 from Marek Polacek  ---
Fixed by r11-1392.

[Bug c++/53610] C++11: constructors accept silly initializers

2019-10-24 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53610

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-24
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Marek Polacek  ---
Oop.  Confirmed.

[Bug c++/53610] C++11: constructors accept silly initializers

2019-10-24 Thread barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53610

Barry Revzin  changed:

   What|Removed |Added

 CC||barry.revzin at gmail dot com

--- Comment #3 from Barry Revzin  ---
Shorter reproduction:

struct S {
S(int);
};

S s{.why = 42};

This still compiles on trunk, even with all warnings and -pedantic. 

Made for a very difficult-to-track down bug, since designated initializers are
a really nice way of mocking out named parameters (except when it's suddenly
not).

[Bug c++/53610] C++11: constructors accept silly initializers

2013-01-29 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53610



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC||andersk at mit dot edu



--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com 2013-01-29 
10:23:45 UTC ---

*** Bug 56137 has been marked as a duplicate of this bug. ***


[Bug c++/53610] C++11: constructors accept silly initializers

2012-06-08 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53610

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2012-06-08 
09:14:23 UTC ---
This seems to be an incomplete implementation of C99 designated initializers,
use -pedantic or -pedantic-errors to get a diagnostic.