diff options
author | Abigail <abigail@abigail.be> | 2017-06-07 01:27:47 +0200 |
---|---|---|
committer | Abigail <abigail@abigail.be> | 2017-06-07 01:29:55 +0200 |
commit | 5d09ee1cb7b68f5e6fd15233bfe5048612e8f949 (patch) | |
tree | d0924c9e9bd43639f941ffbe180dc862fb009a6a /doop.c | |
parent | a8d6ff592a8576239ceda601d73322b51187837f (diff) | |
download | perl-5d09ee1cb7b68f5e6fd15233bfe5048612e8f949.tar.gz |
Fatalize the use of code points above 0xFF for bitwise operators.
This commit removes quite a number of tests, mostly from t/op/bop.t,
which test the behaviour of such code points in combination of
bitwise operators. Since it's now fatal, the tests are no longer useful.
Diffstat (limited to 'doop.c')
-rw-r--r-- | doop.c | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -1029,7 +1029,6 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) const char *rsave; bool left_utf; bool right_utf; - bool do_warn_above_ff = ckWARN_d(WARN_DEPRECATED); STRLEN needlen = 0; PERL_ARGS_ASSERT_DO_VOP; @@ -1110,11 +1109,8 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) rulen -= ulen; duc = luc & ruc; dc = (char*)uvchr_to_utf8((U8*)dc, duc); - if (do_warn_above_ff && (luc > 0xff || ruc > 0xff)) { - Perl_warner(aTHX_ packWARN(WARN_DEPRECATED), - deprecated_above_ff_msg, PL_op_desc[optype]); - /* Warn only once per operation */ - do_warn_above_ff = FALSE; + if (luc > 0xff || ruc > 0xff) { + Perl_croak(aTHX_ fatal_above_ff_msg, PL_op_desc[optype]); } } if (sv == left || sv == right) @@ -1134,10 +1130,8 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) rulen -= ulen; duc = luc ^ ruc; dc = (char*)uvchr_to_utf8((U8*)dc, duc); - if (do_warn_above_ff && (luc > 0xff || ruc > 0xff)) { - Perl_warner(aTHX_ packWARN(WARN_DEPRECATED), - deprecated_above_ff_msg, PL_op_desc[optype]); - do_warn_above_ff = FALSE; + if (luc > 0xff || ruc > 0xff) { + Perl_croak(aTHX_ fatal_above_ff_msg, PL_op_desc[optype]); } } goto mop_up_utf; @@ -1153,10 +1147,8 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) rulen -= ulen; duc = luc | ruc; dc = (char*)uvchr_to_utf8((U8*)dc, duc); - if (do_warn_above_ff && (luc > 0xff || ruc > 0xff)) { - Perl_warner(aTHX_ packWARN(WARN_DEPRECATED), - deprecated_above_ff_msg, PL_op_desc[optype]); - do_warn_above_ff = FALSE; + if (luc > 0xff || ruc > 0xff) { + Perl_croak(aTHX_ fatal_above_ff_msg, PL_op_desc[optype]); } } mop_up_utf: |