[ 22525]
make ~$x give warning is $x isn't initialised.
Also add test for uninitialised warning in & op.
[ 22531]
add code comment for change 22525
p4raw-link: @22531 on //depot/perl:
5ab053b06800167d2bc083dd4186b23d7cb95fce
p4raw-link: @22525 on //depot/perl:
a1afd1046e98b52e81720705c71449e6a5438e69
p4raw-id: //depot/maint-5.8/perl@22551
p4raw-integrated: from //depot/perl@22550 'copy in' t/lib/warnings/sv
(@19752..)
p4raw-integrated: from //depot/perl@22531 'edit in' pp.c (@22525..)
register I32 anum;
STRLEN len;
+ (void)SvPV_nomg(sv,len); /* force check for uninit var */
SvSetSV(TARG, sv);
tmps = (U8*)SvPV_force(TARG, len);
anum = len;
########
# sv.c
use warnings 'uninitialized' ;
+my $Y = 1 ;
+my $x = 1 & $a[$Y] ;
+no warnings 'uninitialized' ;
+my $Y = 1 ;
+$x = 1 & $b[$Y] ;
+EXPECT
+Use of uninitialized value in bitwise and (&) at - line 4.
+########
+# sv.c
+use warnings 'uninitialized' ;
+my $Y = 1 ;
+my $x = ~$a[$Y] ;
+no warnings 'uninitialized' ;
+my $Y = 1 ;
+$x = ~$b[$Y] ;
+EXPECT
+Use of uninitialized value in 1's complement (~) at - line 4.
+########
+# sv.c
+use warnings 'uninitialized' ;
my $x *= 1 ; # d
no warnings 'uninitialized' ;
my $y *= 1 ; # d