This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
move JMPENV_JUMP to die_where and mark it as "noreturn"
[perl5.git] / pp_ctl.c
index ce60ea0..06a0f73 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1543,7 +1543,7 @@ Perl_qerror(pTHX_ SV *err)
        ++PL_parser->error_count;
 }
 
-OP *
+void
 Perl_die_where(pTHX_ SV *msv)
 {
     dVAR;
@@ -1632,14 +1632,15 @@ Perl_die_where(pTHX_ SV *msv)
                    *msg ? msg : "Unknown error\n");
            }
            assert(CxTYPE(cx) == CXt_EVAL);
-           return cx->blk_eval.retop;
+           PL_restartop = cx->blk_eval.retop;
+           JMPENV_JUMP(3);
+           /* NOTREACHED */
        }
     }
 
     write_to_stderr( msv ? msv : ERRSV );
     my_failure_exit();
     /* NOTREACHED */
-    return 0;
 }
 
 PP(pp_xor)