From 1ec4f607b95237e7d3022e1f5df41f1167be4523 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 27 Jul 2012 23:51:59 -0700 Subject: [PATCH] Fix C++ build broken by 1f039d60d3 The goto was bypassing initialisation. Avoiding goto altogether actu- ally simplifies things. --- op.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/op.c b/op.c index d24ea4d..41bea3b 100644 --- a/op.c +++ b/op.c @@ -6377,7 +6377,7 @@ OP* Perl_newLOOPEX(pTHX_ I32 type, OP *label) { dVAR; - OP *o; + OP *o = NULL; PERL_ARGS_ASSERT_NEWLOOPEX; @@ -6387,7 +6387,6 @@ Perl_newLOOPEX(pTHX_ I32 type, OP *label) /* "last()" means "last" */ if (label->op_type == OP_STUB && (label->op_flags & OPf_PARENS)) { o = newOP(type, OPf_SPECIAL); - goto free_label; } } else { @@ -6407,18 +6406,17 @@ Perl_newLOOPEX(pTHX_ I32 type, OP *label) SvUTF8(((SVOP*)label)->op_sv), savesharedpv( SvPV_nolen_const(((SVOP*)label)->op_sv))); - free_label: + } + } + + /* If we have already created an op, we do not need the label. */ + if (o) #ifdef PERL_MAD op_getmad(label,o,'L'); #else op_free(label); #endif - label = NULL; - } - } - - /* If we still have a label op, we need to create a stacked unop. */ - if (label) o = newUNOP(type, OPf_STACKED, label); + else o = newUNOP(type, OPf_STACKED, label); PL_hints |= HINT_BLOCK_SCOPE; return o; -- 1.8.3.1