gcj/278: full hiearchy of interfaces not checked?

Bryce McKinlay bryce@albatross.co.nz
Mon Jul 3 04:40:00 GMT 2000


The following reply was made to PR gcj/278; it has been noted by GNATS.

From: Bryce McKinlay <bryce@albatross.co.nz>
To: Oskar Liljeblad <osk@hem.passagen.se>, java-gnats@sourceware.cygnus.com
Cc:  
Subject: Re: gcj/278: full hiearchy of interfaces not checked?
Date: Mon, 03 Jul 2000 23:38:47 +1200

 This is a multi-part message in MIME format.
 --------------7D4C2CD1C698A6C846153641
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Oskar Liljeblad wrote:
 
 > I applied your patch, recompiled and installed. Now Dialog.java compiles
 > but LayoutManager2.java doesn't. I get this error:
 >
 > $ gcj -C bava/awt/*.java
 > ./bava/awt/LayoutManager2.java:2: Interface `bava.awt.LayoutManager2' already defined in bava/awt/LayoutManager2.java:2.
 > public interface LayoutManager2 extends LayoutManager { }
 >                  ^
 > 1 error
 >
 > Oskar Liljeblad (osk@hem.passagen.se)
 
 Doh.
 
 Try this one. I'm not really sure if the patch is correct - I get the feeling I'm just fixing the symptom here and not the
 real problem... ;-(
 
 regards
 
   [ bryce ]
 
 
 
 --------------7D4C2CD1C698A6C846153641
 Content-Type: text/plain; charset=us-ascii;
  name="gcj-PR278-2.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="gcj-PR278-2.patch"
 
 2000-07-03  Bryce McKinlay  <bryce@albatross.co.nz>
 
 	* class.c (interface_of_p): Call load_class on arguments if they're
 	not loaded and not being compiled from source.
 
 Index: class.c
 ===================================================================
 RCS file: /cvs/gcc/egcs/gcc/java/class.c,v
 retrieving revision 1.70
 diff -u -r1.70 class.c
 --- class.c	2000/06/27 04:30:18	1.70
 +++ class.c	2000/07/03 11:34:46
 @@ -432,6 +432,11 @@
    int n, i;
    tree basetype_vec;
  
 +  if (!CLASS_LOADED_P (type1) && !CLASS_FROM_SOURCE_P (type1))
 +    load_class (type1, 1);
 +  if (!CLASS_LOADED_P (type2) && !CLASS_FROM_SOURCE_P (type2))
 +    load_class (type2, 1);
 +
    if (!(basetype_vec = TYPE_BINFO_BASETYPES (type2)))
      return 0;
    n = TREE_VEC_LENGTH (basetype_vec);
 
 --------------7D4C2CD1C698A6C846153641--
 


More information about the Java-prs mailing list