On Mon, Oct 07, 2019 at 05:11:27PM +, Bernd Edlinger wrote:
> On 10/7/19 9:20 AM, Eric Botcazou wrote:
> > No, please, the cure would be much worse than the disease.
>
> Ack.
>
> I think the least worse thing would be a pragma in the macro where the
> shadowing
> variable is declared...
The
On 10/7/19 9:20 AM, Eric Botcazou wrote:
>> If this ends up acked then please add this to ansidecl.h or
>> somewhere else global as template:
>>
>> template
>> struct push {
>> push (T &);
>> ~push ();
>> T *m_loc;
>> T m_val;
>> };
>>
>> because it would be a general solution for _all_ sh
> If this ends up acked then please add this to ansidecl.h or
> somewhere else global as template:
>
> template
> struct push {
> push (T &);
> ~push ();
> T *m_loc;
> T m_val;
> };
>
> because it would be a general solution for _all_ shadow=local warnings?!
No, please, the cure would b
On Thu, Oct 3, 2019 at 5:18 PM Bernd Edlinger wrote:
>
> 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
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 variab