develooper Front page | perl.perl5.porters | Postings from February 2007

Re: perl-30145 (was Re: Future Perl development)

From:
Nicholas Clark
Date:
February 6, 2007 16:12
Subject:
Re: perl-30145 (was Re: Future Perl development)
Message ID:
20070207001215.GX5748@plum.flirble.org
On Wed, Feb 07, 2007 at 01:08:00AM +0100, Paul Johnson wrote:
> On Tue, Feb 06, 2007 at 09:12:04PM +0000, Nicholas Clark wrote:
> 
> > As you've all clearly demonstrated that you care about Perl 5 development,
> > would you all be so kind as to download this snapshot, install it on your
> > development servers, test it with your production code, and report any
> > issues. I'd be grateful for reports of regressions against 5.8.x, as I tend
> > to find them easier to fix before the release :-)
> > 
> >   http://www.ccl4.org/~nick/P/perl-30145.tar.bz2
> 
> Things were looking pretty good until it came time to build Template
> Toolkit:
> 
> make[1]: Entering directory `/usr/local/pkg/5.8.8-20070206/sw/.cpan/build/Template-Toolkit-2.16/xs'
> /usr/local/pkg/5.8.8-20070206/sw/bin/perl /usr/local/pkg/5.8.8-20070206/sw/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/local/pkg/5.8.8-20070206/sw/lib/perl5/5.8.8/ExtUtils/typemap  Stash.xs > Stash.xsc && mv Stash.xsc Stash.c
> cc -c   -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"2.16\" -DXS_VERSION=\"2.16\" -fpic "-I/usr/local/pkg/5.8.8-20070206/sw/lib/perl5/5.8.8/i686-linux/CORE"   Stash.c
> In file included from Stash.xs:41:
> ppport.h:356:1: warning: "PERL_UNUSED_DECL" redefined
> In file included from Stash.xs:40:
> /usr/local/pkg/5.8.8-20070206/sw/lib/perl5/5.8.8/i686-linux/CORE/perl.h:181:1: warning: this is the location of the previous definition
> Stash.xs: In function #assign#:
> Stash.xs:502: error: syntax error before #svtype#
> Stash.xs:531: error: break statement not within loop or switch
> Stash.xs:533: error: case label not within a switch statement
> Stash.xs:575: error: break statement not within loop or switch
> Stash.xs:577: error: #default# label not within a switch statement
> Stash.xs: At top level:
> Stash.xs:583: error: syntax error before #else#
> make[1]: *** [Stash.o] Error 1

I think I'd argue that its C is buggy:

        /* drop-through if not an object or method not found  */
        switch SvTYPE(SvRV(root)) {


but really also our macros should be wrapped in () to avoid (other)
precedence issues. Currently we have

#define SvTYPE(sv)      (svtype)((sv)->sv_flags & SVTYPEMASK)

(also in blead) which really should be

#define SvTYPE(sv)      ((svtype)((sv)->sv_flags & SVTYPEMASK))

With that change to sv.h it passes all tests for me.

Nicholas Clark



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About