From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10617 invoked by alias); 10 Dec 2002 19:36:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 10601 invoked by uid 71); 10 Dec 2002 19:36:03 -0000 Date: Tue, 10 Dec 2002 11:36:00 -0000 Message-ID: <20021210193603.10600.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Eric Blake Subject: Re: java/8893: Local classes are named incorrectly Reply-To: Eric Blake X-SW-Source: 2002-12/txt/msg00570.txt.bz2 List-Id: The following reply was made to PR java/8893; it has been noted by GNATS. From: Eric Blake To: gbenson@redhat.com Cc: gcc-gnats@gcc.gnu.org Subject: Re: java/8893: Local classes are named incorrectly Date: Tue, 10 Dec 2002 12:22:44 -0700 And how is this a bug? As long as the names don't clash, they are not visible to classes outside the file. There is no specification as to what names local and anonymous classes must be given, and it is left up to the compiler what naming scheme it will choose. gbenson@redhat.com wrote: >>Number: 8893 >>Category: java >>Synopsis: Local classes are named incorrectly >>Confidential: no >>Severity: serious >>Priority: medium >>Responsible: unassigned >>State: open >>Class: sw-bug >>Submitter-Id: net >>Arrival-Date: Tue Dec 10 10:26:08 PST 2002 >>Closed-Date: >>Last-Modified: >>Originator: gbenson@redhat.com >>Release: gcc-3.2 patched for PR 1343 >>Organization: >>Environment: > > Red Hat Linux 8.0 > >>Description: > > The fix for PR 1343 is broken: although the names of local classes are prepended by a number, only one counter is used per source file. For example, the following code: > > | public class Test { > | public void func1() { > | class Foo { > | } > | class Bar { > | } > | } > | public void func2() { > | class Foo { > | } > | } > | } > > compiles to Test.class, Test$1$Foo.class, Test$2$Bar.class and Test$3$Foo.class instead of Test.class, Test$1$Foo.class, Test$1$Bar.class and Test$2$Foo.class. > > >>How-To-Repeat: > > gcj Test.java # attached > >>Fix: > > >>Release-Note: >>Audit-Trail: >>Unformatted: > > ----gnatsweb-attachment---- > Content-Type: application/octet-stream; name="Test.java" > Content-Transfer-Encoding: base64 > Content-Disposition: attachment; filename="Test.java" > > cHVibGljIGNsYXNzIFRlc3QgewogICAgcHVibGljIHZvaWQgZnVuYzEoKSB7CgljbGFzcyBGb28g > ewoJfQoJY2xhc3MgQmFyIHsKCX0KICAgIH0KICAgIHB1YmxpYyB2b2lkIGZ1bmMyKCkgewoJY2xh > c3MgRm9vIHsKCX0KICAgIH0KfQo= > -- This signature intentionally left boring. Eric Blake ebb9@email.byu.edu BYU student, free software programmer