java/8544: Inner interface's are not know inside package's
Tue Nov 12 03:56:00 GMT 2002

>Number:         8544
>Category:       java
>Synopsis:       Inner interface's are not know inside package's
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 12 03:56:02 PST 2002
>Release:        gcc 3.2 and gcc 3.1.1
$ gcj -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../libgcj.spec
rename spec lib to liborig
Configured with: /netrel/src/gcc-3.2-1/configure --enable-languages=c,c++,f77,java
--enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls
--without-included-gettext --enable-interpreter --disable-sjlj-exceptions 
--disable-version-specific-runtime-libs --enable-shared --build=i686-pc-linux
--host=i686-pc-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr 
--exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib 
--includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.2 20020818 (prerelease)

the same problem was seen with gcc-3.1.1 on linux 
With jdk-1.3.1 it's possible to use inner interfaces inside the package. GCC does not compile the example below, but the jdk-1.3.1 does.

  package test_pack;

  import test_pack.StyledText.*;

  class DisplayRenderer {
     StyledText text;
  DisplayRenderer(StyledText parent ) {
     text = parent;

  protected void test() {
	LineCache lineCache; 

  package test_pack;

  public class StyledText {
	LineCache lineCache;

  public StyledText(int a){
  public LineCache getCache() {
    return lineCache;

  interface LineCache {

    public void calculate(int startLine, int lineCount);

  } // end LineCache 
  } // end StyledText

  $ gcj -C test_pack/*.java

you get

  test_pack/ Type `LineCache' not
  found in the declaration
  of the local variable `lineCache'.
        LineCache lineCache;
  1 error




More information about the Gcc-bugs mailing list