@@ -3246,11 +3246,12 @@ static int
32463246compiler_break (struct compiler * c , location loc )
32473247{
32483248 struct fblockinfo * loop = NULL ;
3249+ location origin_loc = loc ;
32493250 /* Emit instruction with line number */
32503251 ADDOP (c , loc , NOP );
32513252 RETURN_IF_ERROR (compiler_unwind_fblock_stack (c , & loc , 0 , & loop ));
32523253 if (loop == NULL ) {
3253- return compiler_error (c , loc , "'break' outside loop" );
3254+ return compiler_error (c , origin_loc , "'break' outside loop" );
32543255 }
32553256 RETURN_IF_ERROR (compiler_unwind_fblock (c , & loc , loop , 0 ));
32563257 ADDOP_JUMP (c , loc , JUMP , loop -> fb_exit );
@@ -3261,11 +3262,12 @@ static int
32613262compiler_continue (struct compiler * c , location loc )
32623263{
32633264 struct fblockinfo * loop = NULL ;
3265+ location origin_loc = loc ;
32643266 /* Emit instruction with line number */
32653267 ADDOP (c , loc , NOP );
32663268 RETURN_IF_ERROR (compiler_unwind_fblock_stack (c , & loc , 0 , & loop ));
32673269 if (loop == NULL ) {
3268- return compiler_error (c , loc , "'continue' not properly in loop" );
3270+ return compiler_error (c , origin_loc , "'continue' not properly in loop" );
32693271 }
32703272 ADDOP_JUMP (c , loc , JUMP , loop -> fb_block );
32713273 return SUCCESS ;
0 commit comments