This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55783] Warnings instead of compiler errors for narrowing conversions within list-initializations
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Dec 2012 00:55:31 +0000
- Subject: [Bug c++/55783] Warnings instead of compiler errors for narrowing conversions within list-initializations
- Auto-submitted: auto-generated
- References: <bug-55783-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-22 00:55:31 UTC ---
Comment 6 misinterprets the standard in multiple ways :)
Narrowing conversions do require a diagnostic, but a warning *is* a diagnostic,
so G++ is compliant in this regard, this is not a GNU extension.
Whether the diagnostic should default to a warning or an error or a "pedwarn"
(the category of diagnostic enabled by -pedantic and made into errors by
-pedantic-errors) is debatable, but the current behaviour is the result of a
conscious decision and is not a bug (certainly not Severity=major)