develooper Front page | perl.ponie.dev | Postings from July 2005

Re: Ponie development snapshot 4

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
July 22, 2005 03:41
Subject:
Re: Ponie development snapshot 4
Message ID:
20050722104100.GT15833@plum.flirble.org
On Thu, Jul 21, 2005 at 02:36:32PM -0400, Andy Dougherty wrote:
> On Thu, 21 Jul 2005, Andy Dougherty wrote:
> 
> > And the compiler seems much happier with the following patch.  I'll test 
> > more carefully to make sure it doesn't raise a hackle somewhere else.
> > 
> > Index: perl/sv.h
> > ===================================================================
> > --- perl/sv.h	(revision 331)
> > +++ perl/sv.h	(working copy)
> > @@ -1501,5 +1501,5 @@
> >  #endif
> >  
> >  #ifndef MUMBLE
> > -#define MUMBLE(p) p
> > +#define MUMBLE(p) ((void *)p)
> >  #endif
> 
> Well, it did give me 7 new warnings:
> 
>     "gv.c", line 1428: warning: a cast does not yield an lvalue
>     "op.c", line 6724: warning: a cast does not yield an lvalue
>     "sv.c", line 308: warning: a cast does not yield an lvalue
>     "regexec.c", line 3232: warning: a cast does not yield an lvalue
>     "universal.c", line 337: warning: a cast does not yield an lvalue
>     "universal.c", line 337: warning: a cast does not yield an lvalue
>     "opmini.c", line 6724: warning: a cast does not yield an lvalue
> 
> but everything seemed to work (I ran out of disk space before
> completing a successful make test).  Also, as I understand the plan,
> this is going to change some more anyway, so these 7 warnings  are much
> better than the 2000 they replace.

Thanks. I found that if I tweak it to this:

Index: sv.h
===================================================================
--- sv.h        (revision 331)
+++ sv.h        (working copy)
@@ -1501,5 +1501,5 @@
 #endif
 
 #ifndef MUMBLE
-#define MUMBLE(p) p
+#define MUMBLE(p) ((void *)(p))
 #endif

then I don't see those errors either. (from gcc in maximal bitchiness mode)

Nicholas Clark

Thread Previous | Thread Next


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