[Bug c++/53333] Initializer lists in std=c++03 mode must be an error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2012-05-12 16:57:26 UTC --- Seems on purpose to me. Of course changing the warning to an error would be trivial. Maybe Jason can comment on why we have a warning here.
[Bug c++/53333] Initializer lists in std=c++03 mode must be an error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5 --- Comment #2 from Marc Glisse glisse at gcc dot gnu.org 2012-05-12 19:46:08 UTC --- There is -pedantic-errors if you want an error.
[Bug c++/53333] Initializer lists in std=c++03 mode must be an error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5 Jason Merrill jason at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID --- Comment #3 from Jason Merrill jason at gcc dot gnu.org 2012-05-12 20:46:09 UTC --- (In reply to comment #2) There is -pedantic-errors if you want an error. Precisely.
[Bug c++/53333] Initializer lists in std=c++03 mode must be an error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5 --- Comment #4 from Fernando Pelliccioni fpelliccioni at gmail dot com 2012-05-12 20:59:58 UTC --- For other features of C++11 don't need -pedantic-errors to emit an error. See.. #include string void foo( std::string str ) {} int main( /* int argc, char* argv[] */ ) { foo( k0 ); return 0; } #g++ -std=c++03 gcc_warning.cpp gcc_warning.cpp:3:23: error: expected ',' or '...' before '' token It doesn't seem consistent. What is the criteria?
[Bug c++/53333] Initializer lists in std=c++03 mode must be an error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5 --- Comment #5 from Marc Glisse glisse at gcc dot gnu.org 2012-05-12 21:57:05 UTC --- (In reply to comment #4) For other features of C++11 don't need -pedantic-errors to emit an error. [...] It doesn't seem consistent. What is the criteria? Allowing {} is a rather isolated extension that doesn't interfere much with anything. Rvalue reference is perhaps the worst example you could pick as it changes the behavior all over the place and can easily break code. I don't know if there are official criteria, the choices may be questionable, but I don't see that it matters that much...
[Bug c++/53333] Initializer lists in std=c++03 mode must be an error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5 --- Comment #6 from Fernando Pelliccioni fpelliccioni at gmail dot com 2012-05-12 23:53:30 UTC --- (In reply to comment #5) (In reply to comment #4) For other features of C++11 don't need -pedantic-errors to emit an error. [...] It doesn't seem consistent. What is the criteria? Allowing {} is a rather isolated extension that doesn't interfere much with anything. Rvalue reference is perhaps the worst example you could pick as it changes the behavior all over the place and can easily break code. I don't know if there are official criteria, the choices may be questionable, but I don't see that it matters that much... I got it. Thanks!