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++/51625] -Wconversion should be on by default, or at least included in -Wall


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

--- Comment #3 from Peter Fraenkel <pnf at podsnap dot com> 2011-12-30 17:14:38 UTC ---
Passing a double to a function expecting an int is very likely a bug and
definitely bad style.  The fact that cmath contains overloaded math functions
with the same names as int math function in stdlib.h makes inadvertent misuse a
real danger.  Ideally, this particular conversion would cause a separate
warning, but absent that feature it is safer to warn on any conversion.


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