java/1455: gcjh barfs on legal java name usage

ashe@qms.com ashe@qms.com
Wed Dec 20 12:28:00 GMT 2000


>Number:         1455
>Category:       java
>Synopsis:       gcjh barfs on legal java name usage
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:20:08 PST 2000
>Closed-Date:    
>Last-Modified:  Thu Nov  4 21:16:00 PST 1999
>Originator:     Steven Ashe
>Release:        2.95.1 and later
>Organization:
>Environment:
linux rh6.0
>Description:
run this legal Java through gcjh:

class Foo {
    public static int  F;

    public void  F() {
    }
}

result is:
static field has same name as method   
>How-To-Repeat:
see "Description"			
>Fix:

>Release-Note:
>Audit-Trail:

Formerly PR gcj/75


From: Tom Tromey <tromey@cygnus.com>
To: Java Gnats Server <java-gnats@sourceware.cygnus.com> 
Cc:  
Subject: gcj/75
Date: 04 Nov 1999 22:20:24 -0700

 Thanks for the report.  This is a known bug.  The problem is that C++
 can't have a method and a field with the same name.
 
 For now, the workaround is "don't do that".
 
 Later, we'd like to change the C++ compiler so we can have an
 attribute which will effectively rename one of the fields.  This
 attribute will also be useful when we want to represent fields with
 non-ASCII characters in their names (there might be another way to do
 that already, but I haven't studied UCN's enough to know if they are
 the right solution for us).
 
 Tom
>Unformatted:



More information about the Gcc-prs mailing list