Repository navigation
Remove "no warnings 'deprecated';" where no longer needed - #23943
Merged
jkeenan merged 1 commit intoNov 18, 2025
Merged
Conversation
These 3 unit tests (which run during t/lib/croak.t):
ok 98 - goto into expression
ok 99 - dump with computed label
ok 100 - when outside given
... no longer need "no warnings 'deprecated';" because they no longer
generate 'deprecated'-class warnings.
Inside pp_ctl.c we have a 'deprecated'-class warning at line 3655, which
falls within function PP(pp_goto). Let's take the 3 unit tests above in
turn.
"goto into expression"
The exception which generates "Can't "goto" into a binary or list
expression" occurs at +3234 pp_ctl.c, inside function S_check_op_type.
This function is called at +3646 pp_ctl.c and at +3680 pp_ctl.c, both of
which are inside function PP(pp_goto). Experimentation indicates that
the invocation at +3646 pp_ctl.c. is the triggering invocation. Hence
control passes to S_check_op_type before the deprecate_fatal warning at
+3655 can be reached.
"dump with computed label"
The exception which generates "Can't find label" occurs at +3635
pp_ctl.c -- 20 lines before the 'deprecated'-class warning.
"when outside given"
The exception which generates "Can't "when" outside a topicalizer"
occurs at +6398 pp_ctl.c, inside function PP(pp_leavewhen). It appears
that in older perls "No warnings 'deprecated';" was needed here because
of the (now apparently abandoned) deprecation of given/when.
wolfsage
approved these changes
Nov 17, 2025
tonycoz
approved these changes
Nov 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These 3 unit tests (which run during t/lib/croak.t):
... no longer need "no warnings 'deprecated';" because they no longer generate 'deprecated'-class warnings.
Inside pp_ctl.c we have a 'deprecated'-class warning at line 3655, which falls within function PP(pp_goto). Let's take the 3 unit tests above in turn.
"goto into expression"
The exception which generates "Can't "goto" into a binary or list expression" occurs at +3234 pp_ctl.c, inside function S_check_op_type. This function is called at +3646 pp_ctl.c and at +3680 pp_ctl.c, both of which are inside function PP(pp_goto). Experimentation indicates that the invocation at +3646 pp_ctl.c. is the triggering invocation. Hence control passes to S_check_op_type before the deprecate_fatal warning at +3655 can be reached.
"dump with computed label"
The exception which generates "Can't find label" occurs at +3635 pp_ctl.c -- 20 lines before the 'deprecated'-class warning.
"when outside given"
The exception which generates "Can't "when" outside a topicalizer" occurs at +6398 pp_ctl.c, inside function PP(pp_leavewhen). It appears that in older perls "No warnings 'deprecated';" was needed here because of the (now apparently abandoned) deprecation of given/when.
Note: This p.r. should be considered for merging into blead before #23922 or #23782.