This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in gcj-20001211 with error message and try without catch


Hi,
i found a bug in gcj of ss-20001211:

public class bug
{
 public static void main(String[] args)
    {
     String x, s;

     try
        {
         x = "";
         s = "";
        }
     finally
        {
        }

     System.out.println( s );
    }
}

gcj -c bug.java
gives:
bug.java: In class `bug':
bug.java: In method `main(java.lang.String[])':
bug.java:16: Variable `s' may not have been initialized.
        System.out.println( s + "Hello World");
   ^
1 error

If any execption occurs in the try block, this line won't be executed
and there should be no problem at all.

Bye,
Martin.

-- 
The early bird gets the worm. If you want something else for       
breakfast, get up later.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]