C/C++ PATCH to improve location for -Wparentheses (PR c/71926)

Jeff Law law@redhat.com
Fri Jul 29 15:31:00 GMT 2016


On 07/29/2016 08:35 AM, Marek Polacek wrote:
> These two parentheses warnings were missing proper location arguments, so the
> location info was less than satisfying.  Fixed thus.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2016-07-29  Marek Polacek  <polacek@redhat.com>
>
> 	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.
OK.
jeff



More information about the Gcc-patches mailing list