From mboxrd@z Thu Jan 1 00:00:00 1970 From: ashe@qms.com To: java-gnats@sourceware.cygnus.com Subject: java/1455: gcjh barfs on legal java name usage Date: Wed, 20 Dec 2000 12:28:00 -0000 Message-id: <19991022233419.31153.qmail@sourceware.cygnus.com> X-SW-Source: 2000-q4/msg01228.html List-Id: >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 To: Java Gnats Server 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: