On Sun, Feb 24, 2008 at 06:15:46PM -0600, Craig A. Berry wrote:
> Trying to build [EMAIL PROTECTED] with ithreads on VMS, the build dies
> due to the following:
> 
>         , Perl_regdupe
> ..........^
> %CC-W-PTRMISMATCH, In the initializer for engines[0].regdupe, the 
> referenced type of the pointer value "Perl_regdupe" is "function 
> (pointer to struct interpreter, pointer to const struct regexp, 
> pointer to struct clone_params) returning pointer to struct regexp", 
> which is not compatible with "function (pointer to struct 
> interpreter, pointer to struct regexp, pointer to struct 
> clone_params) returning pointer to struct regexp".
> at line number 56 in file D0:[CRAIG.perl-5_8.ext.re]re.c;1
> 
>     PL_regdupe = engines[new_state].regdupe;
> ....^
> %CC-W-PTRMISMATCH, In this statement, the referenced type of the 
> pointer value "engines[new_state].regdupe" is "function (pointer to 
> struct interpreter, pointer to struct regexp, pointer to struct 
> clone_params) returning pointer to struct regexp", which is not 
> compatible with "function (pointer to struct interpreter, pointer to 
> const struct regexp, pointer to struct clone_params) returning 
> pointer to struct regexp".
> at line number 98 in file D0:[CRAIG.perl-5_8.ext.re]re.c;1
> 
> Taking a quick look at smokes, for example:
> 
> http://www.nntp.perl.org/group/perl.daily-build.reports/2008/02/msg53938.html
> 
> it appears that the problem is not VMS-specific (except that on VMS
> you have to work harder to ignore compiler warnings).

I don't even get compiler warnings on FreeBSD 6.* from gcc, which is gcc 3.4.6
gcc 4.0.something on OS X does.

> The local declarations in re.xs are in fact wrong compared to the
> prototype, where the first argument is clearly of type C<const
> regexp*>:
> 
> $ search proto.h regdupe
> PERL_CALLCONV regexp*   Perl_regdupe(pTHX_ const regexp* r,
> CLONE_PARAMS* param);
> 
> The attached patch gets the declarations in line with the prototype,
> but surely there must be something appropriate to integrate from a
> later Perl, though I have searched in vain to find it.

Ah. I missed the patch but happend to do exactly the same thing in change 33415

No, there isn't anything to integrate, because the next change to re.xs (28900)
removed that structure completely, and moved it to regexp.h, as part of adding
a pointer to the appropriate engine into each regexp.

http://public.activestate.com/cgi-bin/perlbrowse?filename=ext%2Fre%2Fre.xs&show_filelog=Show+File+Log

(Took me a bit of time to work it out)

Nicholas Clark

Reply via email to