This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/13493] New: extra '<clinit>' generated in object file.
- From: "guilhem at kaffe dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Dec 2003 13:43:49 -0000
- Subject: [Bug java/13493] New: extra '<clinit>' generated in object file.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
a '<clinit>' is generated in the output file of gcc whereas it isn't present in
the class file. In that case it should not be enumerated as a declared method:
this can cause major troubles in the serialization logic of libjava which then
fails to produce a valid serialVersionUID. This seems to happen only in the
typical case of the following example:
public class C
{
static class D extends C
{
private static final String s = "hello";
}
}
If you try to compile this example, it will generate a static '<clinit>' method
in the inner class D, which should not happen as the class file doesn't have it.
--
Summary: extra '<clinit>' generated in object file.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: guilhem at kaffe dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13493