public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: goran@kirra.net
To: gcc-gnats@gcc.gnu.org
Subject: java/6336: function local classes name clash (ClassPath)
Date: Wed, 17 Apr 2002 07:36:00 -0000	[thread overview]
Message-ID: <OF95D58915.A53D2ACF-ONC1256B9E.004F6BA7@sdl.sema.se> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]


>Number:         6336
>Category:       java
>Synopsis:       function local classes name clash with other with same name
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 17 07:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.1 20020417 (prerelease)
>Organization:
>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 i686-pc-linux-gnu --prefix=/usr/local/gcc --enable-threads --enable-languages=java --disable-static : (reconfigured)  : (reconfigured)  : (reconfigured) ./configure i686-pc-linux-gnu --prefix=/usr/local/gcc --enable-threads --enable-languages=java --disable-static : (reconfigured)  : (reconfigured) ./configure i686-pc-linux-gnu --prefix=/usr/local/gcc --enable-threads --enable-languages=java --disable-static : (reconfigured)  : (reconfigured)  : (reconfigured)  : (reconfigured)  : (reconfigured)  : (reconfigured) ./configure --prefix=/usr/local/gcc --enable-threads --enable-languages=java --disable-static
>Description:
ClassPath from CVS contains code with function local classes
with the same name. This is OK with J2SDK, and it should be.
gcj fails to compile it 

simplified code:
--------------------- snip -------------------------------------
import java.util.Vector;

public class x
{
    void f(Object[] l)
    {
	class x1 
	{
	};
    }
    void f(Vector l)
    {
	class x1 
	{
	};
    }
};
--------------------- snip -------------------------------------

gcj complains:

bash-2.05a$ gcj -c /tmp/x.java 
/tmp/x.java:13: Class `x$x1' already defined in /tmp/x.java:7.
   	class x1 
                 ^

>How-To-Repeat:
Compile the code above (test case)

>Fix:

fix: javac (J2SDK) output classes like from the example:

bash-2.05a$ ls /tmp
x$1$x1.class  x$2$x1.class  x.class  x.java

work-around: rename one instance

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


                 reply	other threads:[~2002-04-17 14:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF95D58915.A53D2ACF-ONC1256B9E.004F6BA7@sdl.sema.se \
    --to=goran@kirra.net \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).