Bug 19742 - gcjh shouldn't mangle names in JNI output.
Summary: gcjh shouldn't mangle names in JNI output.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-01 16:28 UTC by Anthony Green
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Green 2005-02-01 16:28:15 UTC
A java class has this:

    public static final int delete = 555;

gcjh will correctly mangle the name delete (to delete$) for CNI header output. 
However, it also does this when generating JNI output (with gcjh -jni).  We get
output link this, and it is wrong:

#undef foo_delete$
#define foo_delete$ 555L

This should be just "foo_delete".  This is preventing the subversion JNI code
from building.
Comment 1 Andrew Pinski 2005-02-01 17:36:21 UTC
I think this is related to PR 16843 well that might have been the bug before as we did not emit the final 
constants before.  We still don't for Inherited constants.
Comment 2 Tom Tromey 2005-02-01 21:04:01 UTC
I'm testing a patch
Comment 3 GCC Commits 2005-02-02 00:44:27 UTC
Subject: Bug 19742

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2005-02-02 00:44:09

Modified files:
	gcc/java       : ChangeLog gjavah.c 

Log message:
	PR java/19742:
	* gjavah.c (get_field_name): Don't override name for JNI header.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1542&r2=1.1543
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/gjavah.c.diff?cvsroot=gcc&r1=1.127&r2=1.128

Comment 4 Tom Tromey 2005-02-02 00:45:04 UTC
Fix checked in