This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #89648] Remove ‘Perl folding rules...’ from dep cat
authorFather Chrysostomos <sprout@cpan.org>
Sat, 13 Jul 2013 07:07:20 +0000 (00:07 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 13 Jul 2013 07:45:13 +0000 (00:45 -0700)
This warning message:

Perl folding rules are not up-to-date for 0x%x; please use the perlbug utility to report;

is in both ‘regexp’ and ‘deprecated’ warning categories. It is under
deprecated warnings so that it has a better chance of showing up.

I think this logic is faulty, because it’s not the deprecatedness that
makes a warning show up by default, but its defaultness; i.e., whether
Perl_ck_warner_d is used instead of Perl_ck_warner. The wide character
warning, for instance, is not under ‘deprecated’, but only ‘utf8’. Yet
it’s a default warning marked as S in perldiag. I think this message
should be treated similarly (and listed with (S regex)).

The next commit will update perldiag accordingly.

regcomp.c

index 4885c0b..e150654 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -574,9 +574,9 @@ static const scan_data_t zero_scan_data =
            (int)offset, RExC_precomp, RExC_precomp + offset);          \
 } STMT_END
 
-#define        ckWARN2regdep(loc,m, a1) STMT_START {                           \
+#define        ckWARN2reg_d(loc,m, a1) STMT_START {                            \
     const IV offset = loc - RExC_precomp;                              \
-    Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED, WARN_REGEXP),    \
+    Perl_ck_warner_d(aTHX_ packWARN(WARN_REGEXP),                      \
            m REPORT_LOCATION,                                          \
            a1, (int)offset, RExC_precomp, RExC_precomp + offset);      \
 } STMT_END
@@ -13562,7 +13562,7 @@ parseit:
                             default:
                                 /* Use deprecated warning to increase the
                                  * chances of this being output */
-                                ckWARN2regdep(RExC_parse, "Perl folding rules are not up-to-date for 0x%"UVXf"; please use the perlbug utility to report;", j);
+                                ckWARN2reg_d(RExC_parse, "Perl folding rules are not up-to-date for 0x%"UVXf"; please use the perlbug utility to report;", j);
                                 break;
                         }
                     }