http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783
Bug #: 55783
Summary: Warnings instead of compiler errors for narrowing
conversions within list-initializations
Classification: Unclassified
Product: gcc
Version: 4.7.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783
--- Comment #2 from David Sankel 2012-12-22
00:13:33 UTC ---
>From what I understand, the standard requires the compiler to reject the
program, not to accept it with a warning.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783
--- Comment #6 from David Sankel 2012-12-22
00:33:44 UTC ---
I suppose which gnu extensions are, by default, enabled in the -std=c++11 mode
is up for debate (one which I have no interest in). However, this program still
compiles with "-pedantic"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783
--- Comment #7 from David Sankel 2012-12-22
00:42:35 UTC ---
I just realized my above comment doesn't make much sense regarding the
standard. Please disregard. On the other hand it seems like -pedantic should
reject this program, no?
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at stellarscience dot com
template void f();
template void f() {}
int main() { f(); }
gcc inaccurately rejects this program, which is violating the following