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++/55254] Warn for implicit conversion from int to char


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-14 17:12:23 UTC ---
An alternative would be to warn for conversion from the char literal '=' to an
integer type.  If you said '=' chances are you meant it to be a char, not
int('='). That wouldn't help if using a non-literal char though.

Or, when calling a function with two or more arguments, if all arguments
require an implicit conversion and re-ordering the arguments would require
fewer implicit conversions, suggest the arguments might be ordered incorrectly.
 That would be more work (to implement, at on every compilation)


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