diff options
author | Karl Williamson <khw@cpan.org> | 2014-09-01 20:00:01 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-09-06 21:12:05 -0600 |
commit | 499333dc7a261e5b3794e032f578b461bd895084 (patch) | |
tree | 1a42d4fb1ce2d58f023d2b62d96c5ed4418803f6 /t/lib/warnings/regcomp | |
parent | 3da4c246d54e1970c6c140305135aea1f1745fbd (diff) | |
download | perl-499333dc7a261e5b3794e032f578b461bd895084.tar.gz |
PATCH: [perl #122671] Many warnings in regcomp.c can occur twice
This solves the problem by moving the warnings to be output only in
pass2 of compilation. The problem arises because almost all of pass1
can be repeated under certain circumstances described in the ticket and
the added comments of this patch.
Diffstat (limited to 't/lib/warnings/regcomp')
-rw-r--r-- | t/lib/warnings/regcomp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/t/lib/warnings/regcomp b/t/lib/warnings/regcomp index b55959e070..f62f5f19bf 100644 --- a/t/lib/warnings/regcomp +++ b/t/lib/warnings/regcomp @@ -1,5 +1,6 @@ regcomp.c These tests have been moved to t/re/reg_mesg.t - except for those that explicitly test line numbers. + except for those that explicitly test line numbers + and those that don't have a <-- HERE in them. __END__ use warnings 'regexp'; @@ -7,3 +8,25 @@ $r=qr/(??{ q"\\b+" })/; "a" =~ /a$r/; # warning should come from this line EXPECT \b+ matches null string many times in regex; marked by <-- HERE in m/\b+ <-- HERE / at - line 3. +######## +# regcomp.c +use warnings 'digit' ; +my $a = qr/\o{1238456}\x{100}/; +my $a = qr/[\o{6548321}]\x{100}/; +no warnings 'digit' ; +my $a = qr/\o{1238456}\x{100}/; +my $a = qr/[\o{6548321}]\x{100}/; +EXPECT +Non-octal character '8'. Resolved as "\o{123}" at - line 3. +Non-octal character '8'. Resolved as "\o{654}" at - line 4. +######## +# regcomp.c.c +use warnings; +$a = qr/\c,/; +$a = qr/[\c,]/; +no warnings 'syntax'; +$a = qr/\c,/; +$a = qr/[\c,]/; +EXPECT +"\c," is more clearly written simply as "l" at - line 3. +"\c," is more clearly written simply as "l" at - line 4. |