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]

java/5758: compilation failure with GCJ pre-3.1 and nested classes



>Number:         5758
>Category:       java
>Synopsis:       compilation failure with GCJ pre-3.1 and nested classes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 23 06:06:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.1 20020223 (experimental)
>Organization:
kirra.net / SchlumbergerSema
>Environment:
System: Linux cm-linux.lla.sema.se 2.4.17 #8 mån feb 18 17:25:46 CET 2002 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --host=i686-pc-linux-gnu --prefix=/usr/local/gcc --enable-threads --enable-languages=c++,java : (reconfigured)  : (reconfigured) ./configure --host=i686-pc-linux-gnu --prefix=/usr/local/gcc --enable-threads --enable-languages=c++,java
>Description:

in this case when extending a "root class" from a public inner class:

---- file RedBlackTree.java -------------------------------
public class RedBlackTree 
{
    public static abstract class AbstractRBNode
    {
    }
}
---- file AccountingTreeBlock.java -------------------------------
public abstract class AccountingTreeBlock extends RedBlackTree.AbstractRBNode {
}
--------------------------------------------------------

Compiling gives:bash-2.05a$ gcj -Wall -c AccountingTreeBlock.java 
AccountingTreeBlock.java:2: Superclass `RedBlackTree.AbstractRBNode' of class `AccountingTreeBlock' not 
  found.   public abstract class AccountingTreeBlock extends RedBlackTree.AbstractRBNode {
                                                             ^
1 error

It compiles OK with JDK 1.3.1 and 1.4 and Jikes 1.5



>How-To-Repeat:
See above
No preprocessor output given by gcj

>Fix:
Break out the inner class as a "root class" in it's own .java file


>Release-Note:
>Audit-Trail:
>Unformatted:


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