develooper Front page | perl.perl5.porters | Postings from September 2003

Re: Interesting - [drow@mvista.com: A user's experiences with GCC-3.4 snapshots]

Thread Previous | Thread Next
From:
Enache Adrian
Date:
September 16, 2003 20:25
Subject:
Re: Interesting - [drow@mvista.com: A user's experiences with GCC-3.4 snapshots]
Message ID:
20030917032415.GB1180@ratsnest.hole
On Tue, Sep 16, 2003 a.d., Chip Salzenberg wrote:
> According to Enache Adrian:
> > Just a cast to void* 'if ((void*)&func) ...' will probably get this right --
> 
> Unfortunately not.  You must cast, but void* isn't a portable choice.

Right. More, that will run just fine with gcc-3.4 :-)

> So this should be portable:
> 
>    typedef void VFUNC();
>    if ((VFUNC*)func != (VFUNC*)main) { ... }

I'll try with that.

Regards,
Adi

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