Bug 15715 - member interfaces are always static
Summary: member interfaces are always static
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: patch, wrong-code
Depends on:
Blocks:
 
Reported: 2004-05-28 19:16 UTC by Tom Tromey
Modified: 2004-07-10 00:35 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-05-28 19:18:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2004-05-28 19:16:06 UTC
A member interface is always implicitly `static'.
gcj generates .class files that don't understand this.
From the output of "jcf-dump java.util.Map":

Attribute "InnerClasses", length:10
  inner: 2=java.util.Map$Entry (19="Entry"), access flags: 0x201 public
interface, outer class: 18=java.util.Map

Note that `static' is not mentioned.
Perhaps it should also be `abstract'; jikes does this.
Comment 1 Andrew Pinski 2004-05-28 19:18:16 UTC
Confirmed.
Comment 2 Andrew Pinski 2004-06-27 08:39:49 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg02226.html>.
Comment 3 GCC Commits 2004-06-27 15:30:14 UTC
Subject: Bug 15715

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bryce@gcc.gnu.org	2004-06-27 15:30:06

Modified files:
	gcc/java       : ChangeLog parse.y jcf-write.c 

Log message:
	2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
	
	PR java/15715.
	* parse.y (create_interface): Set correct access modifiers for
	interfaces.
	* jcf-write.c (get_classfile_modifiers): New function.
	(generate_classfile): Use get_classfile_modifiers, not
	get_access_flags.
	
	2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
	
	* parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
	dependency to current parser context, not NULL_TREE, for top-level
	classes.
	(jdep_resolve_class): Enable member access check for all inner
	class dependencies.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1390&r2=1.1391
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse.y.diff?cvsroot=gcc&r1=1.486&r2=1.487
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-write.c.diff?cvsroot=gcc&r1=1.146&r2=1.147

Comment 4 Bryce McKinlay 2004-06-27 15:34:09 UTC
Fix checked in.