switch (o->op_type) {
case OP_NULL: /* Was holding old type, if any. */
if (PL_madskills && o->op_targ != OP_NULL) {
- o->op_type = o->op_targ;
+ o->op_type = (optype)o->op_targ;
o->op_targ = 0;
goto retry;
}
PERL_ARGS_ASSERT_NEWGIVWHENOP;
NewOp(1101, enterop, 1, LOGOP);
- enterop->op_type = enter_opcode;
+ enterop->op_type = (optype)enter_opcode;
enterop->op_ppaddr = PL_ppaddr[enter_opcode];
enterop->op_flags = (U8) OPf_KIDS;
enterop->op_targ = ((entertarg == NOT_IN_PAD) ? 0 : entertarg);
# define MADPROP_IN_BASEOP
#endif
+typedef PERL_BITFIELD16 optype;
+
#ifdef BASEOP_DEFINITION
#define BASEOP BASEOP_DEFINITION
#else
U8 op_private;
#endif
-/* If op_type:9 is changed to :10, also change PUSHEVAL in cop.h */
+/* If op_type:9 is changed to :10, also change PUSHEVAL in cop.h.
+ Also, if the type of op_type is ever changed (e.g. to PERL_BITFIELD32)
+ then all the other bit-fields before/after it should change their
+ types too to let VC pack them into the same 4 byte integer.*/
#define OP_GIMME(op,dfl) \
(((op)->op_flags & OPf_WANT) == OPf_WANT_VOID ? G_VOID : \