This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Should G++ reject initializer list narrowing conversions in -std=C++11 -pedantic mode?


Programs that depend on narrowing conversions in initializer lists violate 8.5.4 item 3 of ISO/IEC 14882-2012. Currently these programs are compiled successfully with warnings with and without a "-pedantic" flag in C++ 2011 language mode.

Are there any drawbacks to having "-pedantic" mode reject these programs with an error? As it is now, I don't see an easy way for a user to determine if these warnings are due to C++ 2011 non-conformance or just bad programming practices.

Thanks,

David

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

--
David Sankel <david@stellarscience.com>
Stellar Science Ltd Co - Stellar Scientific Software Solutions



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]