Java: Fix mangling of inner-class names, take 2

Bryce McKinlay bryce@waitaki.otago.ac.nz
Fri Nov 16 08:56:00 GMT 2001


This patch removes special-casing of '$' from the name-mangling code in 
GCJ, which is required for inner class names to be compatible between 
Java and C++/CNI.

Why I think this is safe and the right thing to do:

1. There is no platform which libjava can build on that doesn't support 
'$' in labels, because other Java labels (eg "class$") have always used 
"$" without mangling it and there have been no reports of problems.

2. C++ already completely ignores NO_DOLLAR_IN_LABEL except for some 
cruft in the old name mangler, so it makes sense for Java to do the same.

3. If we ever want to build on a platform that cant deal with "$" in 
labels (unlikely), the mangling should really happen at a later stage in 
order to pick up other uses (such as the "class$") and be compatible 
between C++ and Java.

OK to commit?

regards

Bryce.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcj-mangle-dollar.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20011116/ba7565c1/attachment.ksh>


More information about the Java-patches mailing list