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]
Other format: [Raw text]

[Bug java/13493] New: extra '<clinit>' generated in object file.


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


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