From: yves orton Date: Wed, 18 May 2005 08:30:44 +0000 (+0000) Subject: [perl #35857] [PATCH] B::Deparse doesnt handle warnings register properly. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e6f1f7566601a16349ddff15c330d169381d778a;p=p5sagit%2Fp5-mst-13.2.git [perl #35857] [PATCH] B::Deparse doesnt handle warnings register properly. Message-Id: p4raw-id: //depot/perl@24505 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 8e3e42e..c2a24a0 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -1412,10 +1412,10 @@ sub pp_nextstate { sub declare_warnings { my ($from, $to) = @_; - if (($to & WARN_MASK) eq warnings::bits("all")) { + if (($to & WARN_MASK) eq (warnings::bits("all") & WARN_MASK)) { return "use warnings;\n"; } - elsif (($to & WARN_MASK) eq "\0"x length($to)) { + elsif (($to & WARN_MASK) eq ("\0"x length($to) & WARN_MASK)) { return "no warnings;\n"; } return "BEGIN {\${^WARNING_BITS} = ".perlstring($to)."}\n";