forked from Perl/perl5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elide right operand if left operand transfers control
This commit contains the following changes: - The "possible precedence issue" warning now mentions (in parentheses) the name of the control flow operator that triggered the warning: $ ./perl -cwe 'return $a or $b' Possible precedence issue with control flow operator (return) at -e line 1. - CORE::dump now counts as a control flow operator: $ ./perl -cwe 'CORE::dump or f()' Possible precedence issue with control flow operator (dump) at -e line 1. - Any binary operator whose left operand is a control flow operator is optimized out along with any right operand it may have, even if no warning is triggered: $ ./perl -Ilib -MO=Deparse -we '(die $a) + $b' BEGIN { $^W = 1; } die $a; -e syntax OK (No warnings because explicit parentheses are used in the preceding example.) $ ./perl -Ilib -MO=Deparse -we 'exit $a ? 0 : 1' Possible precedence issue with control flow operator (exit) at -e line 1. BEGIN { $^W = 1; } exit $a; -e syntax OK
- Loading branch information
Showing
4 changed files
with
89 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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