Closed p5pRT closed 9 years ago
Commit "add op_comp field to regexp_engine API" 3c13cae629d936c43bca9d992cc445d93287af8e by Dave M added a compiler warning on VC 6\, that needs to get silenced.
----------------------------------------------------------------- cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS OLE -DNO_STRICT -DPERLDLL -DPERL_CORE -O1 -MD -Zi -DNDEBUG -DPERL_EXTERNAL_GLO B -DPERL_IS_MINIPERL -Fo.\mini\pp_ctl.obj ..\pp_ctl.c pp_ctl.c ..\pp_ctl.c(122) : warning C4028: formal parameter 5 different from declaration ----------------------------------------------------------------- new_re = (eng->op_comp ? eng->op_comp : &Perl_re_op_compile )(aTHX_ args\, nargs\, pm->op_code_list\, eng\, re\,\<\<\<\<\<Line 122 &is_bare_re\, (pm->op_pmflags & RXf_PMf_FLAGCOPYMASK)\, pm->op_pmflags | (PL_op->op_flags & OPf_SPECIAL ? PMf_USE_RE_EVAL : 0)); -----------------------------------------------------------------
In the commit Dave M added a "VOL" token which becomes volatile after CPP\, commit message doesn't give any clue to why its there (WAG\, compiler bug somewhere? if so it must be documented).
----------------------------------- regexp.h ----------------------------------- index 8b19055..b4427d3 100644 @@ -159\,14 +159\,18 @@ typedef struct regexp_engine { SV * const value\, const U32 flags); SV* (*named_buff_iter) (pTHX_ REGEXP * const rx\, const SV * const lastkey\, const U32 flags); SV* (*qr_package)(pTHX_ REGEXP * const rx); #ifdef USE_ITHREADS void* (*dupe) (pTHX_ REGEXP * const rx\, CLONE_PARAMS *param); #endif + REGEXP* (*op_comp) (pTHX_ SV ** const patternp\, int pat_count\, + OP *expr\, const struct regexp_engine* eng\, + REGEXP *VOL old_re\, + int *is_bare_re\, U32 orig_rx_flags\, U32 pm_flags); } regexp_engine; -------------------------------------------------------- expanded CPP ------------------------------------------------------- REGEXP* (*op_comp) (PerlInterpreter* my_perl \, SV ** const patternp\, int pat_count\, OP *expr\, const struct regexp_engine* eng\, REGEXP *volatile old_re\, char *is_bare_re\, U32 orig_rx_flags\, U32 pm_flags); -------------------------------------------------------
but the prototype of function pointer Perl_re_op_compile (the other operand of the ?:) doesnt have volatile flag\, and triggers the "warning C4028: formal parameter 5 different from declaration"
------------------------------------------------------- REGEXP * Perl_re_op_compile(pTHX_ SV ** const patternp\, int pat_count\, OP *expr\, const regexp_engine* eng\, REGEXP *old_re\, bool *is_bare_re\, U32 orig_rx_flags\, U32 pm_flags) { -------------------------------------------------------
So why is volatile in proto for op_comp member?
On Sun Oct 05 11:36:13 2014\, bulk88 wrote:
In the commit Dave M added a "VOL" token which becomes volatile after CPP\, commit message doesn't give any clue to why its there (WAG\, compiler bug somewhere? if so it must be documented).
I think it can be removed. See 1067df30ae9.
--
Father Chrysostomos
The RT System itself - Status changed from 'new' to 'open'
On Sun\, Oct 05\, 2014 at 12:58:09PM -0700\, Father Chrysostomos via RT wrote:
On Sun Oct 05 11:36:13 2014\, bulk88 wrote:
In the commit Dave M added a "VOL" token which becomes volatile after CPP\, commit message doesn't give any clue to why its there (WAG\, compiler bug somewhere? if so it must be documented).
I think it can be removed. See 1067df30ae9.
agreed
-- You never really learn to swear until you learn to drive.
On Mon Oct 06 05:41:08 2014\, davem wrote:
On Sun\, Oct 05\, 2014 at 12:58:09PM -0700\, Father Chrysostomos via RT wrote:
On Sun Oct 05 11:36:13 2014\, bulk88 wrote:
In the commit Dave M added a "VOL" token which becomes volatile after CPP\, commit message doesn't give any clue to why its there (WAG\, compiler bug somewhere? if so it must be documented).
I think it can be removed. See 1067df30ae9.
agreed
I have removed it in 7984ae89f.
--
Father Chrysostomos
@cpansprout - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#122911 (status was 'resolved')
Searchable as RT122911$