re PR c/71926 (wrong location for -Wparentheses warning)
authorMarek Polacek <polacek@redhat.com>
Fri, 29 Jul 2016 17:39:39 +0000 (17:39 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 29 Jul 2016 17:39:39 +0000 (17:39 +0000)
commit638fc14f07ae8908141b520b9d11ba364f087018
tree0fe460480bf9bb01eac667e2c342d2230fe60b19
parente00dceafd2de848a7735dbce48922aa2304a0f94
re PR c/71926 (wrong location for -Wparentheses warning)

PR c/71926
* c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
parentheses warning.

* semantics.c (maybe_convert_cond): Use the location of COND for the
parentheses warning.

* g++.dg/warn/Wparentheses-30.C: New test.
* gcc.dg/Wparentheses-14.c: New test.

From-SVN: r238886
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wparentheses-30.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wparentheses-14.c [new file with mode: 0644]