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

--- Comment #9 from David Binderman <dcb314 at hotmail dot com> ---
Quite interestingly, I ran cppcheck over recent gcc trunk code
and got this:

trunk/gcc/ada/sysdep.c:447:26: style: Expression is always true because 'else
if' condition is opposite to previous condition at line 439. [multiCondition]
trunk/gcc/config/mn10300/mn10300.cc:888:8: warning: Identical inner 'if'
condition is always true. [identicalInnerCondition]
trunk/libffi/src/m32r/ffi.c:66:15: warning: Identical inner 'if' condition is
always true. [identicalInnerCondition]
trunk/zlib/contrib/minizip/zip.c:1212:26: warning: Identical inner 'if'
condition is always true. [identicalInnerCondition]

#4 looks like a false positive.

I had a quick look at the most recent linux kernel (6.16) and found 
14 cases of multiCondition, 51 cases of identicalInnerCondition
and 6 cases of oppositeInnerCondition, making 71 reports in total.

Reply via email to