public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1296: wrong output filename for static inner interfaces in interfaces
@ 2000-12-20 12:24 osk
0 siblings, 0 replies; only message in thread
From: osk @ 2000-12-20 12:24 UTC (permalink / raw)
To: java-gnats
>Number: 1296
>Category: java
>Synopsis: wrong output filename for static inner interfaces in interfaces
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 20 12:18:50 PST 2000
>Closed-Date: Thu Jul 06 17:49:14 PDT 2000
>Last-Modified: Thu Jul 6 17:50:00 PDT 2000
>Originator: Oskar Liljeblad
>Release: unknown-1.0
>Organization:
>Environment:
Debian GNU/Linux
GNU libc 2.1.3
gcc 2.96 snapshot 20000612
libgcj snapshot 2000-06-18
>Description:
Inner static interfaces in interfaces should be compiled into a
java bytecode file named 'Outer$Inner.class', but is compiled into
'Inner.class'.
Consider this example:
------------------------------
$ cat >Map.java
public interface Map {
public static interface Entry { }
}
^D
$ gcj -C Map.java
$ ls -l *.class
-rw-r--r-- 1 usel usel 133 Jun 21 14:25 Entry.class
-rw-r--r-- 1 usel usel 129 Jun 21 14:25 Map.class
$ rm *.class
$ javac Map.java
$ ls -l *.class
-rw-r--r-- 1 usel usel 212 Jun 21 14:26 Map$Entry.class
-rw-r--r-- 1 usel usel 212 Jun 21 14:26 Map.class
$
------------------------------
Oskar Liljeblad (osk@hem.passagen.se)
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Formerly PR gcj/275
State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Sat Jul 1 23:38:37 2000
State-Changed-Why:
I posted a patch.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: osk@hem.passagen.se
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/275: wrong output filename for static inner interfaces in interfaces
Date: Sat, 1 Jul 2000 23:31:38 -0700 (PDT)
osk@hem.passagen.se writes:
> Inner static interfaces in interfaces should be compiled into a java
> bytecode file named 'Outer$Inner.class', but is compiled into
> 'Inner.class'.
Indeed. Here's a patch.
./A
2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (parser_qualified_classname): Removed parameter
`is_static'.
(create_interface): Removed first passed parameter to
parser_qualified_classname.
(create_class): Likewise. Don't install alias on static inners.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.188
diff -u -p -r1.188 parse.y
--- parse.y 2000/06/30 02:22:15 1.188
+++ parse.y 2000/07/02 06:21:04
@@ -81,7 +81,7 @@ static tree find_field PARAMS ((tree, t
static tree lookup_field_wrapper PARAMS ((tree, tree));
static int duplicate_declaration_error_p PARAMS ((tree, tree, tree));
static void register_fields PARAMS ((int, tree, tree));
-static tree parser_qualified_classname PARAMS ((int, tree));
+static tree parser_qualified_classname PARAMS ((tree));
static int parser_check_super PARAMS ((tree, tree, tree));
static int parser_check_super_interface PARAMS ((tree, tree, tree));
static void check_modifiers_consistency PARAMS ((int));
@@ -3649,7 +3649,7 @@ create_interface (flags, id, super)
tree id, super;
{
tree raw_name = EXPR_WFL_NODE (id);
- tree q_name = parser_qualified_classname (flags & ACC_STATIC, raw_name);
+ tree q_name = parser_qualified_classname (raw_name);
tree decl = IDENTIFIER_CLASS_VALUE (q_name);
EXPR_WFL_NODE (id) = q_name; /* Keep source location, even if refined. */
@@ -3784,7 +3784,7 @@ create_class (flags, id, super, interfac
tree class_id, decl;
tree super_decl_type;
- class_id = parser_qualified_classname (0, raw_name);
+ class_id = parser_qualified_classname (raw_name);
decl = IDENTIFIER_CLASS_VALUE (class_id);
EXPR_WFL_NODE (id) = class_id;
@@ -3840,13 +3840,6 @@ create_class (flags, id, super, interfac
CLASS_COMPLETE_P (decl) = 1;
add_superinterfaces (decl, interfaces);
- /* If the class is a top level inner class, install an alias. */
- if (INNER_CLASS_DECL_P (decl) && CLASS_STATIC (decl))
- {
- tree alias = parser_qualified_classname (1, raw_name);
- IDENTIFIER_GLOBAL_VALUE (alias) = decl;
- }
-
/* Add the private this$<n> field, Replicate final locals still in
scope as private final fields mangled like val$<local_name>.
This doesn't not occur for top level (static) inner classes. */
@@ -4785,15 +4778,13 @@ unresolved_type_p (wfl, returned)
/* From NAME, build a qualified identifier node using the
qualification from the current package definition. */
-static tree
-parser_qualified_classname (is_static, name)
- int is_static;
+tree
+parser_qualified_classname (name)
tree name;
{
tree nested_class_name;
- if (!is_static
- && (nested_class_name = maybe_make_nested_class_name (name)))
+ if ((nested_class_name = maybe_make_nested_class_name (name)))
return nested_class_name;
if (ctxp->package)
From: apbianco@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se
Cc:
Subject: Re: gcj/275
Date: 2 Jul 2000 06:38:37 -0000
Synopsis: wrong output filename for static inner interfaces in interfaces
State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Sat Jul 1 23:38:37 2000
State-Changed-Why:
I posted a patch.
http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=275&database=java
State-Changed-From-To: feedback->closed
State-Changed-By: apbianco
State-Changed-When: Thu Jul 6 17:49:14 2000
State-Changed-Why:
I checked in the following patch:
http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00179.html
From: apbianco@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se
Cc:
Subject: Re: gcj/275
Date: 7 Jul 2000 00:49:14 -0000
Synopsis: wrong output filename for static inner interfaces in interfaces
State-Changed-From-To: feedback->closed
State-Changed-By: apbianco
State-Changed-When: Thu Jul 6 17:49:14 2000
State-Changed-Why:
I checked in the following patch:
http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00179.html
http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=275&database=java
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-20 12:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:24 java/1296: wrong output filename for static inner interfaces in interfaces osk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).