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++/64759] The compiler does NOT show a warning in a case where it is reasonable to expect a warning message.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64759

--- Comment #2 from Lakshay Garg <lakshayg at iitk dot ac.in> ---
(In reply to Andrew Pinski from comment #1)
> !x is the same as x == 0.0  and yes sometimes it make sense to compare
> against zero.

It makes sense to compare against 0 but not 0.0 . NOT operation makes sense
when used with booleans and integers. If someone is using logical not with
doubles then there is a high chance that it was done unintentionally.


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