[Bug middle-end/77426] Duplicate condition in expmed.c
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 31 18:46:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77426
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
For the simplest case (A && A), we warn with -Wlogical-op:
int foo(int a, int b, int c)
{
if(b == c && b == c) return 1; /* warn */
if(a && b == c && b == c) return 2; /* missing warning */
return 0;
}
Also PR71345.
More information about the Gcc-bugs
mailing list