[PATCH] Fix -Wshadow=local warnings in dumpfile.h

Bernd Edlinger bernd.edlinger@hotmail.de
Fri Oct 4 18:00:00 GMT 2019


On 10/4/19 2:16 PM, Richard Sandiford wrote:
> Bernd Edlinger <bernd.edlinger@hotmail.de> writes:
>> Hi,
>>
>> this fixes a -Wshadow=local warning when using AUTO_DUMP_SCOPE in
>> nested blocks.  Since NAME i a string I cannot use it to create
>> a unique name for the auto_dump_scope object.
>>
>> So I used XCONCAT2 from good old symcat.h, to mangle the __LINE__
>> macro into the scope object name.
> 
> Seems a pity to reintroduce uses of symcat.h again now when it was
> originally only a bridge from pre-ISO C.  How about just importing
> XCONCAT2 into system.h instead?  I guess it's a bit of an abuse of
> system.h, but not really much worse than CEIL, ROUND_UP, etc., and
> that's where symcat.h was originally included.
> 

Done.

Is it OK for trunk?


Thanks
Bernd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-wshadow-dumpfile.diff
Type: text/x-patch
Size: 1280 bytes
Desc: patch-wshadow-dumpfile.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191004/a19caddc/attachment.bin>


More information about the Gcc-patches mailing list