From mboxrd@z Thu Jan 1 00:00:00 1970 From: osk@hem.passagen.se To: java-gnats@sourceware.cygnus.com Subject: java/1180: gcjh confused about similar method and attribute names Date: Wed, 20 Dec 2000 12:21:00 -0000 Message-id: <20000416094906.15133.qmail@sourceware.cygnus.com> X-SW-Source: 2000-q4/msg00964.html List-Id: >Number: 1180 >Category: java >Synopsis: gcjh confused about similar method and attribute names >Confidential: no >Severity: serious >Priority: medium >Responsible: tromey >State: closed >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Dec 20 12:17:05 PST 2000 >Closed-Date: Sun Apr 16 22:52:20 PDT 2000 >Last-Modified: Sun Apr 16 23:00:00 PDT 2000 >Originator: Oskar Liljeblad >Release: 2.96 20000313 >Organization: >Environment: Debian GNU/Linux 2.2 (libc 2.1.3; kernel 2.2.14) >Description: In Java, method and attribute names are in different namespaces. gcjh tries to take care of this when there's a confusion, like the 'foo' method and the 'foo' attribute in this class: class Test { public int foo; public int foo() { return foo; } } The relevant output of gcjh here is: virtual jint foo () { return foo; } jint foo__; As you can see, the "inlined" method should really return foo__, not foo. Oskar Liljeblad (osk@hem.passagen.se) >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: Formerly PR gcj/205 From: Bryce McKinlay To: osk@hem.passagen.se Cc: java-gnats@sourceware.cygnus.com Subject: Re: gcj/205: gcjh confused about similar method and attribute names Date: Mon, 17 Apr 2000 13:32:51 +1200 osk@hem.passagen.se wrote: > As you can see, the "inlined" method should really > return foo__, not foo. Thanks for the bug report. This reminds me of PR gcj/75, which is listed as "open" and claims that gcjh will not accept such classes at all. It looks as though the bug has been partially fixed (duplicate field names are suffixed with "__"), but "inlined" methods are not apparantly aware of this. regards [ bryce ] Responsible-Changed-From-To: apbianco->tromey Responsible-Changed-By: tromey Responsible-Changed-When: Sun Apr 16 19:55:06 2000 Responsible-Changed-Why: Mine. State-Changed-From-To: open->feedback State-Changed-By: tromey State-Changed-When: Sun Apr 16 19:55:06 2000 State-Changed-Why: I checked in a fix for this. Could you try it out and get back to me? From: tromey@cygnus.com To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se, tromey@cygnus.com Cc: Subject: Re: gcj/205 Date: 17 Apr 2000 02:55:06 -0000 Synopsis: gcjh confused about similar method and attribute names Responsible-Changed-From-To: apbianco->tromey Responsible-Changed-By: tromey Responsible-Changed-When: Sun Apr 16 19:55:06 2000 Responsible-Changed-Why: Mine. State-Changed-From-To: open->feedback State-Changed-By: tromey State-Changed-When: Sun Apr 16 19:55:06 2000 State-Changed-Why: I checked in a fix for this. Could you try it out and get back to me? http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=205&database=java From: Bryce McKinlay To: tromey@cygnus.com Cc: java-gnats@sourceware.cygnus.com Subject: Re: gcj/205 Date: Mon, 17 Apr 2000 17:45:28 +1200 tromey@cygnus.com wrote: > I checked in a fix for this. > Could you try it out and get back to me? It works for me. PR gcj/75 can probibly be closed as well. regards [ bryce ] State-Changed-From-To: feedback->closed State-Changed-By: tromey State-Changed-When: Sun Apr 16 22:52:20 2000 State-Changed-Why: Bryce reports it as working. From: tromey@cygnus.com To: java-gnats@sourceware.cygnus.com, osk@hem.passagen.se, tromey@cygnus.com Cc: Subject: Re: gcj/205 Date: 17 Apr 2000 05:52:20 -0000 Synopsis: gcjh confused about similar method and attribute names State-Changed-From-To: feedback->closed State-Changed-By: tromey State-Changed-When: Sun Apr 16 22:52:20 2000 State-Changed-Why: Bryce reports it as working. http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=205&database=java >Unformatted: