This is the mail archive of the java-prs@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



>Number:         334
>Category:       gcj
>Synopsis:       gcj doesn't handle method names that are reserved C++ keywords
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 29 06:16:00 PDT 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]