Skip to content

Commit

Permalink
pp.c: Add dummy goto to silence -Wunused-label warning in pp_divide
Browse files Browse the repository at this point in the history
The label "ret" was only referred in PERL_TRY_UV_DIVIDE block
which is not compiled on typical 32-bit build, thus it used to
trigger a warning like "label ‘ret’ defined but not used".

Added goto will be optimized out and should not incur any runtime
overhead.
  • Loading branch information
t-a-k authored and mauke committed Nov 27, 2023
1 parent ded9a6e commit 6f880c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pp.c
Expand Up @@ -1621,6 +1621,7 @@ PP(pp_divide)
#endif
DIE(aTHX_ "Illegal division by zero");
TARGn(left / right, 1);
goto ret; /* redundant, but silence -Wunused-label */
}

ret:
Expand Down

0 comments on commit 6f880c1

Please sign in to comment.