From: Yves Orton Date: Thu, 15 Feb 2007 12:07:40 +0000 (+0100) Subject: Re: [perl #41491] Incorrect regexp warning. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ae10a673121fdbb7e442dbc204486adf42fe05c;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #41491] Incorrect regexp warning. Message-ID: <9b18b3110702150307t21b5efd2jfdeebccdff9175b1@mail.gmail.com> p4raw-id: //depot/perl@30313 --- diff --git a/regcomp.c b/regcomp.c index e0a0f5c..197ab12 100644 --- a/regcomp.c +++ b/regcomp.c @@ -5669,7 +5669,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) } else if (paren != '?') /* Not Conditional */ ret = br; - *flagp |= flags & (SPSTART | HASWIDTH); + *flagp |= flags & (SPSTART | HASWIDTH | POSTPONED); lastbr = br; while (*RExC_parse == '|') { if (!SIZE_ONLY && RExC_extralen) { @@ -5690,9 +5690,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) return(NULL); REGTAIL(pRExC_state, lastbr, br); /* BRANCH -> BRANCH. */ lastbr = br; - if (flags&HASWIDTH) - *flagp |= HASWIDTH; - *flagp |= flags&SPSTART; + *flagp |= flags & (SPSTART | HASWIDTH | POSTPONED); } if (have_branch || paren != ':') { @@ -5833,7 +5831,7 @@ S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth) } else if (ret == NULL) ret = latest; - *flagp |= flags&HASWIDTH; + *flagp |= flags&(HASWIDTH|POSTPONED); if (chain == NULL) /* First piece. */ *flagp |= flags&SPSTART; else {