This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: GH #17363 Reserve two sequences
authorKarl Williamson <khw@cpan.org>
Wed, 18 Dec 2019 00:59:16 +0000 (17:59 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 18 Dec 2019 01:01:47 +0000 (18:01 -0700)
We can't guarantee what people might do in the future with these two
currently unused illegal pattern sequences.  What I did was put a
comment and code where things would have to change to use them to refer
to this ticket.

regcomp.c

index 129d692..4320fc2 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -11376,6 +11376,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
                                 RExC_parse-seqstart, seqstart);
                NOT_REACHED; /*NOTREACHED*/
             case '<':           /* (?<...) */
+                /* If you want to support (?<*...), first reconcile with GH #17363 */
                if (*RExC_parse == '!')
                    paren = ',';
                else if (*RExC_parse != '=')
@@ -11949,6 +11950,8 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
                     ckWARNreg(RExC_parse, "Empty (?) without any modifiers");
                 }
                 /* FALLTHROUGH */
+            case '*': /* If you want to support (?*...), first reconcile with GH #17363 */
+           /* FALLTHROUGH */
            default: /* e.g., (?i) */
                RExC_parse = (char *) seqstart + 1;
               parse_flags: