(int)offset, RExC_precomp, RExC_precomp + offset); \
} STMT_END
+#define ckWARNdep(loc,m) STMT_START { \
+ const IV offset = loc - RExC_precomp; \
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), \
+ m REPORT_LOCATION, \
+ (int)offset, RExC_precomp, RExC_precomp + offset); \
+} STMT_END
+
#define ckWARNregdep(loc,m) STMT_START { \
const IV offset = loc - RExC_precomp; \
Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED, WARN_REGEXP), \
FLAGS(ret) = get_regex_charset(RExC_flags);
*flagp |= SIMPLE;
if (! SIZE_ONLY && (U8) *(RExC_parse + 1) == '{') {
- ckWARNregdep(RExC_parse, "\"\\b{\" is deprecated; use \"\\b\\{\" instead");
+ ckWARNdep(RExC_parse, "\"\\b{\" is deprecated; use \"\\b\\{\" instead");
}
goto finish_meta_pat;
case 'B':
FLAGS(ret) = get_regex_charset(RExC_flags);
*flagp |= SIMPLE;
if (! SIZE_ONLY && (U8) *(RExC_parse + 1) == '{') {
- ckWARNregdep(RExC_parse, "\"\\B{\" is deprecated; use \"\\B\\{\" instead");
+ ckWARNdep(RExC_parse, "\"\\B{\" is deprecated; use \"\\B\\{\" instead");
}
goto finish_meta_pat;
########
# regcomp.c [S_regatom]
# The \q should warn, the \_ should NOT warn.
-use warnings 'regexp'; no warnings "deprecated";
+use warnings qw(regexp deprecated);
"foo" =~ /\q/;
"foo" =~ /\q{/;
"foo" =~ /a\b{cde/;
"foo" =~ /a\B{cde/;
"bar" =~ /\_/;
-no warnings 'regexp';
+no warnings qw(regexp deprecated);
"foo" =~ /\q/;
"foo" =~ /\q{/;
"foo" =~ /a\b{cde/;