Bug#875424: cop.h: shadows a previous local variable
Dominic Hargreaves
dom at earth.li
Mon Sep 11 10:15:04 UTC 2017
Fixed: 5.26.0~rc1-1
Control: severity -1 minor
On Mon, Sep 11, 2017 at 10:12:31AM +0200, Christian Brabandt wrote:
> Package: libperl5.24
> Version: 5.24.1-3+deb9u1
> Severity: normal
> Tags: patch
>
> Hi compiling vim with perl-support generates this warning:
> In file included from /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/perl.h:3905:0,
> from if_perl.xs:58:
> /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/inline.h: In function ‘S_cx_popsub_args’:
> /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/cop.h:612:13: warning: declaration of ‘av’ shadows a previous local [-Wshadow]
> AV *av = GvAV(PL_defgv); \
> ^
> /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/cop.h:612:13: note: in definition of macro ‘CX_POP_SAVEARRAY’
> AV *av = GvAV(PL_defgv); \
> ^~
> In file included from /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/perl.h:5859:0,
> from if_perl.xs:58:
> /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/inline.h:518:9: note: shadowed declaration is here
> AV *av;
> ^~
> Those warnings are generated from the referenced perl header files, so I
> believe this should be fixed in libperl5.24.
>
> This patch fixes it:
Hi,
Thanks for the report. This warning has been fixed[1] in 5.26 which is
now in Debian unstable. As per this upstream mailing list thread[2]
the code was previously correct, so I don't think this warrants a
stable update.
Cheers,
Dominic.
[1] <https://perl5.git.perl.org/perl.git/commit/f2b9631d5d19d2b71c1776e1193173d13f3620bf>
[2] <https://www.nntp.perl.org/group/perl.perl5.porters/2016/05/msg236465.html>
More information about the Perl-maintainers
mailing list