This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: GCJ can't find methods in nested interfaces
- To: Anthony Green <green at cygnus dot com>
- Subject: Re: GCJ can't find methods in nested interfaces
- From: Jeff Sturm <jsturm at sigma6 dot com>
- Date: Wed, 27 Oct 1999 12:06:54 -0400
- CC: java-discuss at sourceware dot cygnus dot com
- Organization: AppNet
- References: <38161AFB.3E75598C@sigma6.com> <199910262133.OAA29128@hoser.cygnus.com>
Anthony Green wrote:
>
> Jeff wrote:
> > It seems the presence of the .class files confuses gcj. If this hasn't
> > yet been fixed I'll file a bug report.
>
> Let me know if this works. It's one a few patches I have yet to
> commit.
This patch fixed my project build, but breaks the compiler when building
libgcj... it reports "java.io.Serializable already defined in ..."
I don't understand why, but after backing out this patch I was able to
build libgcj again.
> 1999-10-23 Anthony Green <green@cygnus.com>
>
> * class.c (add_interface_do): Load interfaces when required.
>
> Index: gcc/java/class.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/java/class.c,v
> retrieving revision 1.45
> diff -u -p -u -r1.45 class.c
> --- class.c 1999/09/11 22:22:57 1.45
> +++ class.c 1999/10/26 21:31:20
> @@ -324,6 +324,10 @@ add_interface_do (basetype_vec, interfac
> TREE_VIA_VIRTUAL (interface_binfo) = 1;
> TREE_VIA_PUBLIC (interface_binfo) = 1;
> TREE_VEC_ELT (basetype_vec, i) = interface_binfo;
> +
> + /* If the interface hasn't been loaded yet, do so now. */
> + if (! CLASS_LOADED_P (interface_class))
> + load_class (interface_class, 1);
> }
>
> /* Add INTERFACE_CLASS to THIS_CLASS iff INTERFACE_CLASS can't be
>
> AG
>
> --
> Anthony Green Cygnus Solutions
> Sunnyvale, California
--
Jeff Sturm
jsturm@sigma6.com