[PATCH] Fix -Wshadow=local warnings in passes.c

Bernd Edlinger bernd.edlinger@hotmail.de
Thu Oct 3 15:18:00 GMT 2019


Hi,

this fixes -Wshadow=local warnings in passes.c.
The non-trivial part is due to the PUSH_INSERT_PASSES_WITHIN
is used recursively, and shadows the local value p
in each invocation.

Fixed by using a helper class that restores the saved content
of p at the end of the block.

The shadowing variable in ipa_write_summaries can simply be
removed sine the outer variable of the same name has the
same type and is not live here, this is a trivial change.


Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
Is it OK for trunk?


Thanks
Bernd.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-wshadow-passes.diff
Type: text/x-patch
Size: 1498 bytes
Desc: patch-wshadow-passes.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191003/4eea9550/attachment.bin>


More information about the Gcc-patches mailing list