This is the mail archive of the gcc-bugs@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]

[Bug c++/55783] Warnings instead of compiler errors for narrowing conversions within list-initializations


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)


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