PERL_ARGS_ASSERT_CK_BITOP;
o->op_private = (U8)(PL_hints & HINT_INTEGER);
+
+ if (o->op_type == OP_NBIT_OR || o->op_type == OP_SBIT_OR
+ || o->op_type == OP_NBIT_XOR || o->op_type == OP_SBIT_XOR
+ || o->op_type == OP_NBIT_AND || o->op_type == OP_SBIT_AND
+ || o->op_type == OP_NCOMPLEMENT || o->op_type == OP_SCOMPLEMENT)
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_EXPERIMENTAL__BITWISE),
+ "The bitwise feature is experimental");
if (!(o->op_flags & OPf_STACKED) /* Not an assignment */
&& OP_IS_INFIX_BIT(o->op_type))
{
Perl_ck_null, /* not */
Perl_ck_bitop, /* complement */
Perl_ck_bitop, /* ncomplement */
- Perl_ck_null, /* scomplement */
+ Perl_ck_bitop, /* scomplement */
Perl_ck_smartmatch, /* smartmatch */
Perl_ck_fun, /* atan2 */
Perl_ck_fun, /* sin */
This is to prevent the problem of one module changing the array base out
from under another module inadvertently. See L<perlvar/$[> and L<arybase>.
+=item The bitwise feature is experimental
+
+(S experimental::bitwise) This warning is emitted if you use bitwise
+operators (C<& | ^ ~ &. |. ^. ~.>) with the "bitwise" feature enabled.
+Simply suppress the warning if you want to use the feature, but know
+that in doing so you are taking the risk of using an experimental
+feature which may change or be removed in a future Perl version:
+
+ no warnings "experimental::bitwise";
+ use feature "bitwise";
+ $x |.= $y;
+
=item The crypt() function is unimplemented due to excessive paranoia.
(F) Configure couldn't find the crypt() function on your machine,
not not ck_null ifs1 S
complement 1's complement (~) ck_bitop fsT1 S
ncomplement numeric 1's complement (~) ck_bitop fsT1 S
-scomplement string 1's complement (~) ck_null fsT1 S
+# scomplement uses ck_bitop only for the experimental warning. Once the
+# warning is gone, this can change to ck_null.
+scomplement string 1's complement (~) ck_bitop fsT1 S
smartmatch smart match ck_smartmatch s2