re PR c/63357 (Warn for P && P and P || P (same expression used multiple times in...
authorMarek Polacek <polacek@redhat.com>
Fri, 24 Apr 2015 12:10:52 +0000 (12:10 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 24 Apr 2015 12:10:52 +0000 (12:10 +0000)
commit8c2b7f79721cb9ef50d996ef2073210e7402c69a
tree109667391d09834474b25b70680f05eff7d00712
parent4853031ec832b9fd29e0894016038cc9f83e31cc
re PR c/63357 (Warn for P && P and P || P  (same expression used multiple times in a condition))

PR c/63357
* c-common.c (warn_logical_operator): Warn if the operands have the
same expressions.

* doc/invoke.texi: Update description of -Wlogical-op.

* c-c++-common/Wlogical-op-1.c: New test.

From-SVN: r222408
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wlogical-op-1.c [new file with mode: 0644]