@@ -3246,11 +3246,12 @@ static int
3246
3246
compiler_break (struct compiler * c , location loc )
3247
3247
{
3248
3248
struct fblockinfo * loop = NULL ;
3249
+ location origin_loc = loc ;
3249
3250
/* Emit instruction with line number */
3250
3251
ADDOP (c , loc , NOP );
3251
3252
RETURN_IF_ERROR (compiler_unwind_fblock_stack (c , & loc , 0 , & loop ));
3252
3253
if (loop == NULL ) {
3253
- return compiler_error (c , loc , "'break' outside loop" );
3254
+ return compiler_error (c , origin_loc , "'break' outside loop" );
3254
3255
}
3255
3256
RETURN_IF_ERROR (compiler_unwind_fblock (c , & loc , loop , 0 ));
3256
3257
ADDOP_JUMP (c , loc , JUMP , loop -> fb_exit );
@@ -3261,11 +3262,12 @@ static int
3261
3262
compiler_continue (struct compiler * c , location loc )
3262
3263
{
3263
3264
struct fblockinfo * loop = NULL ;
3265
+ location origin_loc = loc ;
3264
3266
/* Emit instruction with line number */
3265
3267
ADDOP (c , loc , NOP );
3266
3268
RETURN_IF_ERROR (compiler_unwind_fblock_stack (c , & loc , 0 , & loop ));
3267
3269
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" );
3269
3271
}
3270
3272
ADDOP_JUMP (c , loc , JUMP , loop -> fb_block );
3271
3273
return SUCCESS ;
0 commit comments