Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: For anyone who cares: gcc compile oddity

> On Oct 25, 2017, at 3:30 AM, Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
> I was watching a build of netbsd-7 scroll past (it cam be amusing
> watching gcc printing warnings about code in gcc...) when I saw this
> one fly past.
> To me this looks like it might indicate a real error, rather than
> just typical gcc noise.
> If anyone cares, here is the warning (the build continued happily).
> (All of this is from a netbsd-7 checkout that is, I believe, up to date.)
> kre
> /local/netbsd/src-7/tools/gcc/../../external/gpl3/gcc/dist/gcc/config/i386/i386.c: In function 'bool ix86_rtx_costs(rtx, int, int, int, int*, bool)':
> /local/netbsd/src-7/tools/gcc/../../external/gpl3/gcc/dist/gcc/config/i386/i386.c:34183:24: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
>      || (!GET_CODE (x) != LABEL_REF
>                        ^
> /local/netbsd/src-7/tools/gcc/../../external/gpl3/gcc/dist/gcc/config/i386/i386.c:34183:24: warning: comparison of constant '45' with boolean expression is always true [-Wbool-compare]

Or Not Does Not Equal would confuse me to say the least. 

Maybe the left-hand ! also covers the case where GET_CODE(x) is an error/null?

Home | Main Index | Thread Index | Old Index