Change 33756 by [EMAIL PROTECTED] on 2008/04/27 09:21:45

        Warnings within the condition of while are not reported with the
        correct line number. TODO test inspired by code from Bram.

Affected files ...

... //depot/perl/t/lib/warnings/9uninit#25 edit

Differences ...

==== //depot/perl/t/lib/warnings/9uninit#25 (text) ====
Index: perl/t/lib/warnings/9uninit
--- perl/t/lib/warnings/9uninit#24~33710~       2008-04-18 03:42:17.000000000 
-0700
+++ perl/t/lib/warnings/9uninit 2008-04-27 02:21:45.000000000 -0700
@@ -1332,6 +1332,22 @@
 Use of uninitialized value $undef in numeric eq (==) at - line 4.
 Use of uninitialized value $undef in numeric eq (==) at - line 5.
 ########
+# TODO long standing bug - conditions of while loops
+use warnings;
+
+my $c;
+my $d = 1;
+while ($c == 0 && $d) {
+  # a
+  # few
+  # blank
+  # lines
+  undef $d;
+}
+EXPECT
+Use of uninitialized value $c in numeric eq (==) at - line 5.
+Use of uninitialized value $c in numeric eq (==) at - line 5.
+########
 # TODO long standing bug - more general variant of the above problem
 use warnings;
 my $undef;
End of Patch.

Reply via email to