Re: Ponie development snapshot 4
[email protected] (Nicholas Clark) Mon, 11 Jul 2005 11:57:22 +0100
| Newsgroups | perl.ponie.dev |
|---|---|
| Message-ID | <[email protected]> |
Sorry, your message got eaten as spam. I've just retrieved it.
On Mon, Jun 27, 2005 at 03:41:42PM -0400, Andy Dougherty wrote:
> On Mon, 27 Jun 2005, Nicholas Clark wrote:
>
> > I've rolled up a development snapshot. It's available at
> >
> > http://opensource.fotango.com/~nclark/ponie-4.tar.bz2
>
> On the perl side of things, I ran into the following problem:
>
> "perl.c", line 3410: operand cannot have void type: op "&&"
> "perl.c", line 3410: operands must have scalar type: op "&&"
> "perl.c", line 3488: operand cannot have void type: op "&&"
> "perl.c", line 3488: operands must have scalar type: op "&&"
> "perl.c", line 4264: warning: statement not reached
> "perl.c", line 4413: operand cannot have void type: op "&&"
> "perl.c", line 4413: operands must have scalar type: op "&&"
> "perl.c", line 4423: operand cannot have void type: op "&&"
> "perl.c", line 4423: operands must have scalar type: op "&&"
> "perl.c", line 4432: operand cannot have void type: op "&&"
> "perl.c", line 4432: operands must have scalar type: op "&&"
>
> Line 3140 is
> GvHV(gv) = (HV*)SvREFCNT_inc(PL_defstash)
> which expands to something like
> ( ( ( ( ( XPVGV * ) Parrot_PMC_get_pointer_intkey ( PL_Parrot , gv , Ponie_P_ANY ) ) -> xgv_gp ) ) -> gp_hv ) = (HV*) ( ( PL_Sv = ( SV * ) ( PL_defstash ) ) , ( PL_Sv && Parrot_PMC_set_intval_intkey ( PL_Parrot , PL_Sv , Ponie_I_SV_REFCNT_INC , + 1 ) ) , ( SV * ) PL_Sv );
>
> This doesn't work because over in parrot/extend.c, Parrot_PMC_set_intval_intkey()
> is a void function. The problem is the non-gcc version of the the
> SvREFCNT_inc macro in sv.h. Sorry, no, I don't have a patch handy.
gcc agreed when it was forced to try to compile that bit.
Could you try the following, which gcc is happy with:
Index: sv.h
===================================================================
--- sv.h (revision 328)
+++ sv.h (revision 329)
@@ -158,7 +158,7 @@
})
#else
# define SvREFCNT_inc(sv) \
- ((PL_Sv=(SV*)(sv)), (PL_Sv && Parrot_PMC_set_intval_intkey(PL_Parrot, MUMBLE(PL_Sv), Ponie_I_SV_REFCNT_INC, +1)), (SV*)PL_Sv)
+ ((PL_Sv=(SV*)(sv)), PL_Sv ? (Parrot_PMC_set_intval_intkey(PL_Parrot, MUMBLE(PL_Sv), Ponie_I_SV_REFCNT_INC, +1), (SV*)PL_Sv) : (SV*)PL_Sv)
#endif
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC)
It's checked into subversion, so if you have a checkout handy just sync it.
( http://svn.perl.org/ponie/trunk/ )
Nicholas Clark