Java: Don't mangle "$" characters in identifier names

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Tue Mar 13 19:50:00 GMT 2001


> From: Jason Merrill <jason@redhat.com>
> Date: 13 Mar 2001 13:20:55 +0000

> Apparently someone once decided that using '.' instead of '$' would be a
> good idea on SVR4 platforms.

Perhaps somewhat sound paranoia, as '$' could be used as a
register prefix, to disambiguate symbols from register names, as
user symbols normally have no specific prefix (like underscore)
on SVR4 systems.  No such target in gcc CVS, though that's just
temporary, hopefully: I actually chose to use '$' as a register
prefix for CRIS assembly code with one of the main reasons for
that character was that NO_DOLLAR_IN_LABEL is set in
config/elfos.h.

> Now that the mangling scheme doesn't use either of these, we should remove
> this macro definition, and most of the remaining NO_*_IN_LABEL code around
> the compiler.

Having '$' as a first valid character would IMHO cause problems.
Possibly that does not happen for mangling.

brgds, H-P



More information about the Java-patches mailing list