Bug 111698 - gcj fails to compile Interface within an interface
gcj fails to compile Interface within an interface
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-08 17:19 EST by Dennis Gregorovic
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-07 07:45:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
example interface with subinterface (104 bytes, text/plain)
2003-12-08 17:20 EST, Dennis Gregorovic
no flags Details
extends subinterface (188 bytes, text/plain)
2003-12-08 17:21 EST, Dennis Gregorovic
no flags Details
extends interface and references subinterface (460 bytes, text/plain)
2003-12-08 17:22 EST, Dennis Gregorovic
no flags Details

  None (edit)
Description Dennis Gregorovic 2003-12-08 17:19:19 EST
Description of problem:
gcj fails to compile a class that extends a subinterface or a class
that references a subinterface.  Example code to be attached.

Version-Release number of selected component (if applicable):
05:18:10 dgregor@galileo example$ gcj --version
gcj (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-23)


How reproducible:
always

Steps to Reproduce:
1.  see attached code
2.
3.
  
Actual results:
successful compilation.  IBM and Sun JDKs compile this code successfully.

Expected results:
compilation errors

Additional info:
Comment 1 Dennis Gregorovic 2003-12-08 17:20:56 EST
Created attachment 96410 [details]
example interface with subinterface
Comment 2 Dennis Gregorovic 2003-12-08 17:21:40 EST
Created attachment 96411 [details]
extends subinterface
Comment 3 Dennis Gregorovic 2003-12-08 17:22:15 EST
Created attachment 96412 [details]
extends interface and references subinterface
Comment 4 Dennis Gregorovic 2003-12-08 17:22:50 EST
05:10:38 dgregor@galileo example$ gcj *.java
FooBar.java:1: Superinterface `Foo.Bar' of class `FooBar' not found.
   public final class FooBar implements Foo.Bar {
                                        ^
1 error
MyFoo.java:4: Superinterface `Foo' of class `MyFoo' not found.
   public class MyFoo implements Foo {
                                 ^
MyFoo.java:6: Type `Foo.Bar' not found in the declaration of the
argument `bar' of method `addBar'.
       public void addBar(Foo.Bar bar) {
                          ^
MyFoo.java:9: Type `Foo' not found in the declaration of the return
type of method `copy'.
       public Foo copy() {
              ^
MyFoo.java:10: Type `Foo' not found in the declaration of the local
variable `newFoo'.
           Foo newFoo = new MyFoo();
           ^
MyFoo.java:12: Type `Bar' not found in the declaration of the local
variable `bar'.
               Bar bar = (Bar) bars.next();
               ^
5 errors
Comment 5 Vadim Nasardinov 2003-12-08 17:40:23 EST
Just wanted to mention that attachment 96410 [details] basically has the same 
structure as java.util.Map and java.util.Map.Entry, i.e.
Map.Entry is an inner interface of the Map interface.
Comment 6 Richard Li 2004-01-20 16:15:31 EST
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8544
Comment 7 Jakub Jelinek 2004-10-07 07:45:15 EDT
This is already tracked upstream.

Note You need to log in before you can comment on or make changes to this bug.