PATCH to tidy up code in c-warn.c

Jeff Law law@redhat.com
Mon Oct 17 19:12:00 GMT 2016


On 10/16/2016 04:53 AM, Marek Polacek wrote:
> Found when looking at something else.  find_array_ref_with_const_idx_r would
> uselessly keep on looking for other array refs with constant indices, even
> though finding one is enough.  So return when something is found, instead of
> just ignoring the subtrees.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2016-10-16  Marek Polacek  <polacek@redhat.com>
>
> 	* c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
> 	Return immediately when finding a match.
> 	(warn_tautological_cmp): Remove a boolean variable that is no longer
> 	needed.
OK.
jeff



More information about the Gcc-patches mailing list