develooper Front page | perl.perl5.porters | Postings from May 2010

[perl #8955] missing warning

Thread Previous
From:
Alexandr Ciornii via RT
Date:
May 11, 2010 13:33
Subject:
[perl #8955] missing warning
Message ID:
rt-3.6.HEAD-4976-1273610022-544.8955-14-0@perl.org
Same result on 5.12.0.

On Thu Apr 18 15:12:26 2002, rspier@pobox.com wrote:
> 
> Why does the first @{$u} cause a warning (with -w) but the second one
> doesn't?  
> 
> $u = undef;
> @w = @{$u};
> for (@{$u}) {};
> 
> Use of uninitialized value in array dereference at - line 3.
> 
> Seen in perl-current (rc1 to be) and all the way back to 5.005_03,
> although the warning may vary.  
> 
> I started tracking this down (but the email client crashed with an
> hour worth of notes in it.)  I think it's got something to do with the
> second pp_rv2av op having the OPf_REF flag set, but the first one
> doesn't, probably because of what the for is going to do with it.  I
> tried to track down where it got set, but it was a twisty twisty maze.


-- 
Alexandr Ciornii, http://chorny.net


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About