summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-04-27 21:52:02 -0600
committerKarl Williamson <khw@cpan.org>2015-04-29 18:19:35 -0600
commit996de84d864e2452987ceb29dbf56f1ce92846b8 (patch)
treefd4ffe5630b1da3165653009742f49f5a240206b /regexec.c
parent122af3100408d1e1ee6b6583ec1d84a85f0a0f3a (diff)
downloadperl-996de84d864e2452987ceb29dbf56f1ce92846b8.tar.gz
PATCH: [perl #124348] re/pat_advanced solaris failure
Tony Cook traced this down to a compiler bug. But it's easy to change the code to avoid the problem. The expression evaluates to 0; and was only in the form that caused the failure to document what was going on. Now, instead the failed form is shown in comments, and 0 is used directly.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/regexec.c b/regexec.c
index 7247259023..893ce3b5a0 100644
--- a/regexec.c
+++ b/regexec.c
@@ -5623,11 +5623,11 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
switch((bound_type) FLAGS(scan)) {
case TRADITIONAL_BOUND:
ln = (locinput == reginfo->strbeg)
- ? isWORDCHAR_L1('\n')
+ ? 0 /* isWORDCHAR_L1('\n') */
: isWORDCHAR_utf8(reghop3((U8*)locinput, -1,
(U8*)(reginfo->strbeg)));
n = (NEXTCHR_IS_EOS)
- ? isWORDCHAR_L1('\n')
+ ? 0 /* isWORDCHAR_L1('\n') */
: isWORDCHAR_utf8((U8*)locinput);
match = cBOOL(ln != n);
break;
@@ -5693,10 +5693,10 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
switch((bound_type) FLAGS(scan)) {
case TRADITIONAL_BOUND:
ln = (locinput == reginfo->strbeg)
- ? isWORDCHAR_L1('\n')
+ ? 0 /* isWORDCHAR_L1('\n') */
: isWORDCHAR_L1(UCHARAT(locinput - 1));
n = (NEXTCHR_IS_EOS)
- ? isWORDCHAR_L1('\n')
+ ? 0 /* isWORDCHAR_L1('\n') */
: isWORDCHAR_L1(nextchr);
match = cBOOL(ln != n);
break;