java/1361: gcj doesn't handle method names that are reserved C++ keywords

osk@hem.passagen.se osk@hem.passagen.se
Wed Dec 20 12:25:00 GMT 2000


>Number:         1361
>Category:       java
>Synopsis:       gcj doesn't handle method names that are reserved C++ keywords
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tromey
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:19:18 PST 2000
>Closed-Date:    Fri Nov 24 12:48:59 PST 2000
>Last-Modified:  Fri Nov 24 12:50:01 PST 2000
>Originator:     Oskar Liljeblad
>Release:        unknown-1.0
>Organization:
>Environment:
egcs 2.96 20000814
>Description:
The example below shows that while gcjh was earlier fixed
to handle names that are reserved C++ keywords (PR211),
gcj wasn't. It is still looking for a C++ method named
`register'.

$ sh reproduce 
/tmp/ccAaymiG.o: In function `test::test(void)':
/home/usel/_java/test.java(.data+0xc): undefined reference to `test::register(void)'
/tmp/ccAaymiG.o: In function `global constructors keyed to test::test(void)':
/home/usel/_java/test.java(.data+0x3c): undefined reference to `test::register(void)'
collect2: ld returned 1 exit status
$

Oskar Liljeblad (osk@hem.passagen.se)
>How-To-Repeat:
#!/bin/sh

cat >test.java <<_end_
class test {
  public native void register();
}
_end_

cat >test_nat.cc <<_end_
#include <gcj/cni.h>
#include "test.h"
void test::__dummy_register() { }
_end_

gcj -C test.java
gcjh test
gcj -o test --main=test test.java test_nat.cc -I/home/usel/Base/include
>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR gcj/334


From: Tom Tromey <tromey@cygnus.com>
To: osk@hem.passagen.se
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/334: gcj doesn't handle method names that are reserved C++ keywords
Date: 29 Aug 2000 09:58:42 -0600

 Oskar> The example below shows that while gcjh was earlier fixed
 Oskar> to handle names that are reserved C++ keywords (PR211),
 Oskar> gcj wasn't. It is still looking for a C++ method named
 Oskar> `register'.
 
 This is actually a known problem.  I think we'd like to fix it by
 adding an attribute to the C++ compiler so that we can pick the name
 that will be put into the object file.  No one has had time to work on
 this for a long, long time.
 
 Tom
Responsible-Changed-From-To: apbianco->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Mon Oct 16 15:00:40 2000
Responsible-Changed-Why:
    I fixed it
State-Changed-From-To: open->feedback
State-Changed-By: tromey
State-Changed-When: Mon Oct 16 15:00:40 2000
State-Changed-Why:
    I fixed this on October 5.
    I checked in a patch that causes all C++ keywords to
    be changed by appending a "$".  Both gcj and gcjh agree
    on this convention.
    Please give it a try and get back to me.
    Thanks.

From: tromey@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com,
  osk@hem.passagen.se, tromey@cygnus.com
Cc:  
Subject: Re: gcj/334
Date: 16 Oct 2000 22:00:41 -0000

 Synopsis: gcj doesn't handle method names that are reserved C++ keywords
 
 Responsible-Changed-From-To: apbianco->tromey
 Responsible-Changed-By: tromey
 Responsible-Changed-When: Mon Oct 16 15:00:40 2000
 Responsible-Changed-Why:
     I fixed it
 State-Changed-From-To: open->feedback
 State-Changed-By: tromey
 State-Changed-When: Mon Oct 16 15:00:40 2000
 State-Changed-Why:
     I fixed this on October 5.
     I checked in a patch that causes all C++ keywords to
     be changed by appending a "$".  Both gcj and gcjh agree
     on this convention.
     Please give it a try and get back to me.
     Thanks.
 
 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=334&database=java

From: Oskar Liljeblad <osk@hem.passagen.se>
To: java-gnats@sourceware.cygnus.com, tromey@cygnus.com
Cc:  
Subject: Re: gcj/334
Date: Thu, 23 Nov 2000 23:05:08 +0100

 I ran my test script in this PR (334) and it seems the bug has
 been fixed in gcj 2000-11-06. In other words, you can probably
 close the PR.
 
 Oskar (osk@hem.passagen.se)
State-Changed-From-To: feedback->closed
State-Changed-By: tromey
State-Changed-When: Fri Nov 24 12:48:59 2000
State-Changed-Why:
    Reported as fixed.

From: tromey@cygnus.com
To: java-gnats@sourceware.cygnus.com, osk@hem.passagen.se, tromey@cygnus.com
Cc:  
Subject: Re: gcj/334
Date: 24 Nov 2000 20:48:59 -0000

 Synopsis: gcj doesn't handle method names that are reserved C++ keywords
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: tromey
 State-Changed-When: Fri Nov 24 12:48:59 2000
 State-Changed-Why:
     Reported as fixed.
 
 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=334&database=java
>Unformatted:




More information about the Gcc-prs mailing list