Re: [PATCH] Fix -Wshadow=local warnings in genmatch.c

2019-10-04 Thread Jakub Jelinek
On Fri, Oct 04, 2019 at 11:52:11AM +, Bernd Edlinger wrote: > Admittedly I was also completely surprised that the if scope > extends to the else block. If that is in fact wrong, we ought to > fix that before I ruin the while code-base with changes like that. It is correct. http://eel.is/c++dr

Re: [PATCH] Fix -Wshadow=local warnings in genmatch.c

2019-10-04 Thread Bernd Edlinger
On 10/4/19 12:54 PM, Richard Biener wrote: > On Thu, Oct 3, 2019 at 5:18 PM Bernd Edlinger > wrote: >> >> Hi, >> >> this fixes -Wshadow=local warnings in genmatch.c itself and in generated >> files as well. >> >> The non-trivial part of this patch is renaming the generated local variables >> in t

Re: [PATCH] Fix -Wshadow=local warnings in genmatch.c

2019-10-04 Thread Richard Biener
On Thu, Oct 3, 2019 at 5:18 PM Bernd Edlinger wrote: > > Hi, > > this fixes -Wshadow=local warnings in genmatch.c itself and in generated > files as well. > > The non-trivial part of this patch is renaming the generated local variables > in the gimple-match.c, to use different names for variables

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

2019-10-03 Thread Bernd Edlinger
Hi, this fixes -Wshadow=local warnings in genmatch.c itself and in generated files as well. The non-trivial part of this patch is renaming the generated local variables in the gimple-match.c, to use different names for variables in inner blocks, and use a depth index to access the right value. A