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 libgcc/70800] libgcc/config/libbid/bid_binarydecimal.c: suspicious comparison ?


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

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
I just discovered that clang++ can be made to find this bug by
adding flag -Wtautological-compare.

jan22a.cc:6:17: warning: bitwise comparison always
      evaluates to false [-Wtautological-compare]
        if ((n & 0x30) == 1)
            ~~~~~~~~~~~^~~~

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