Re: [PATCH] Fix -Wshadow warning in libiberty/cp-demangle.c

2016-11-14 Thread Ian Lance Taylor
On Sun, Nov 6, 2016 at 10:03 AM, Mark Wielaard wrote: > > We now have -Wshadow=local. So the attached patch uses that for > libiberty. Is the attached patch OK to commit? This is OK. Thanks. Ian

Re: [PATCH] Fix -Wshadow warning in libiberty/cp-demangle.c

2016-11-13 Thread Mark Wielaard
On Sun, Nov 06, 2016 at 07:03:34PM +0100, Mark Wielaard wrote: > On Sat, 2016-09-10 at 09:51 -0400, Eric Gallager wrote: > > On 9/10/16, Ian Lance Taylor wrote: > > > I'm not sure about the patch to configure.ac/configure. The last I > > > looked -Wshadow would warn if a local variable shadows a

Re: [PATCH] Fix -Wshadow warning in libiberty/cp-demangle.c

2016-11-06 Thread Mark Wielaard
On Sat, 2016-09-10 at 09:51 -0400, Eric Gallager wrote: > On 9/10/16, Ian Lance Taylor wrote: > > I'm not sure about the patch to configure.ac/configure. The last I > > looked -Wshadow would warn if a local variable shadows a global > > variable. That can cause a pointless build break if some sy

Re: [PATCH] Fix -Wshadow warning in libiberty/cp-demangle.c

2016-09-10 Thread Eric Gallager
On 9/10/16, Ian Lance Taylor wrote: > On Fri, Sep 9, 2016 at 5:06 PM, Mark Wielaard wrote: >> valgrind contains a copy of the libiberty demangler which gets compiled >> with -Wshadow. That shows the following warning: >> >> cp-demangle.c: In function ‘d_substitution’: >> cp-demangle.c:3772:35: wa

Re: [PATCH] Fix -Wshadow warning in libiberty/cp-demangle.c

2016-09-10 Thread Mark Wielaard
On Sat, Sep 10, 2016 at 01:57:54AM -0700, Ian Lance Taylor wrote: > On Fri, Sep 9, 2016 at 5:06 PM, Mark Wielaard wrote: > > Fix that by renaming the struct demangle_component variable to dc > > and add -Wshadow to ac_libiberty_warn_cflags (the only warning is this one). > > > > libiberty/ChangeLo

Re: [PATCH] Fix -Wshadow warning in libiberty/cp-demangle.c

2016-09-10 Thread Ian Lance Taylor
On Fri, Sep 9, 2016 at 5:06 PM, Mark Wielaard wrote: > valgrind contains a copy of the libiberty demangler which gets compiled > with -Wshadow. That shows the following warning: > > cp-demangle.c: In function ‘d_substitution’: > cp-demangle.c:3772:35: warning: declaration of ‘c’ shadows a previous

[PATCH] Fix -Wshadow warning in libiberty/cp-demangle.c

2016-09-09 Thread Mark Wielaard
valgrind contains a copy of the libiberty demangler which gets compiled with -Wshadow. That shows the following warning: cp-demangle.c: In function ‘d_substitution’: cp-demangle.c:3772:35: warning: declaration of ‘c’ shadows a previous local struct demangle_component *c;