perl5
perl5 copied to clipboard
5.41.4: B::Deparse generates code which emits "Possible precedence problem between ! and numeric eq (==)" warning
Module: B::Deparse
Description
!$something == $else throws warnings with perl 5.41.x. B::Deparse may generate code which triggers this warning.
Steps to Reproduce Sample oneliner:
$ perl5.41.4 -w -MO=Deparse -e 'my $p; if ((!$p) == 1) { }' | perl5.41.4 -cw
-e syntax OK
Possible precedence problem between ! and numeric eq (==) at - line 3.
- syntax OK
Output produced by B::Deparse is here:
BEGIN { $^W = 1; }
my $p;
if (!$p == 1) {
();
}
-e syntax OK
Expected behavior
B::Deparse should not drop the parentheses in this example
Perl configuration
Seen with normally compiled 5.41.4
Module: B::Deparse
Description
!$something == $elsethrows warnings with perl 5.41.x.B::Deparsemay generate code which triggers this warning.Steps to Reproduce Sample oneliner:
$ perl5.41.4 -w -MO=Deparse -e 'my $p; if ((!$p) == 1) { }' | perl5.41.4 -cw -e syntax OK Possible precedence problem between ! and numeric eq (==) at - line 3. - syntax OK[snip]
@mauke, do you have thoughts on this problem?