This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/12857] Illegal method modifier when loading a generated .class
- From: "jsturm at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Nov 2003 01:50:20 -0000
- Subject: [Bug java/12857] Illegal method modifier when loading a generated .class
- References: <20031031141021.12857.yves.martin@elca.ch>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12857
jsturm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|2003-10-31 15:37:37 |2003-11-03 01:50:18
date| |
Target Milestone|--- |3.4
------- Additional Comments From jsturm at gcc dot gnu dot org 2003-11-03 01:50 -------
Nice test case, thanks.
The problem here is that gcj tries to create the static "class$" synthetic
method in TestInterface, which the verifier quite rightly complains about (as
does libgcj's bytecode verifier, for that matter).
The proper fix is to create an anonymous inner class of TestInterface to contain
the class$ method. This is what jikes and javac do.
This is a little awkward in gcj where we don't discover that this anonymous
class is necessary until the 2nd pass, at which time the list of classes to
generate is normally complete. I'll try to think of a non-intrusive patch so
this can go into 3.4.