[Bug c/71926] wrong location for -Wparentheses warning
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 29 17:40:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71926
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Jul 29 17:39:39 2016
New Revision: 238886
URL: https://gcc.gnu.org/viewcvs?rev=238886&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wparentheses-30.C
trunk/gcc/testsuite/gcc.dg/Wparentheses-14.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list