Bug 9547

Summary: member type access not respected
Product: gcc Reporter: Tom Tromey <tromey>
Component: javaAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, java-prs
Priority: P3 Keywords: accepts-invalid
Version: 3.4.0   
Target Milestone: 4.3.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2005-07-23 05:27:22
Bug Depends on: 28067    
Bug Blocks: 13607    

Description Tom Tromey 2003-02-03 18:06:00 UTC
Right now gcj will let a subclass see member type defined
in a superclass, even if that member type has default
access protection and the two classes are in different
packages.

For instance, this code compiles but should not.

package one;

import two.*;

public class o extends t
{
  boolean doit(Object x)
  {
    return x instanceof Res;
  }
}
package two;

public class t
{
  class Res
  {
  }
}

Release:
unknown
Comment 1 Andrew Pinski 2003-05-26 00:13:21 UTC
Still exits on the mainline (20030525).
Comment 2 Andrew Pinski 2003-12-03 05:50:04 UTC
There are couple of bugs like this one, I wondering if they will ever get fixed? 
Comment 3 Tom Tromey 2003-12-03 16:40:45 UTC
Nobody knows... I suppose someone will fix these bugs
when they become important for some reason.
I know the package-private bug is in process at least.
Comment 4 Tom Tromey 2007-01-09 20:44:56 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.