This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in gcj-20001211 with error message and try without catch
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Bug in gcj-20001211 with error message and try without catch
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- Date: Fri, 15 Dec 2000 14:28:15 +0100
- Reply-To: martin dot kahlert at infineon dot com
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.