On Wed, 20 Sep 2000, Eric Roode wrote:

>     foo();
>     print $x;
> 
> Generate a warning, or not?  Which one? Remember, foo() may initialize $x.


        My suggest (FWIW) would be that, if there is no execution path
which leads to $x being defined in the second line, then a "Use of
uninit'd variable $x" warning should be thrown at compile time.  If there
is at least one path that will result in $x being defined AND at least one
path that will result in it being undefined, the compile-time warning
could be something like "Possible use of undefined variable $x" or "Not
all execution paths leave $x defined".

                                Dave

Reply via email to