summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2007-02-15 13:07:40 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-15 12:39:46 +0000
commit8ae10a673121fdbb7e442dbc204486adf42fe05c (patch)
tree0a1d6e4eac957d45579e7a970d728d3607c63200 /regcomp.c
parent878090d5582120ef9336936d4fc06895b4fd242a (diff)
downloadperl-8ae10a673121fdbb7e442dbc204486adf42fe05c.tar.gz
Re: [perl #41491] Incorrect regexp warning.
Message-ID: <9b18b3110702150307t21b5efd2jfdeebccdff9175b1@mail.gmail.com> p4raw-id: //depot/perl@30313
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index e0a0f5c462..197ab12dc0 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 {