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

Daniel Berlin dberlin@redhat.com
Tue Mar 13 21:57:00 GMT 2001


Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:

\> > 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.
>
Correct, it's impossible.

The first character for a mangled name is always _ (the second is
always Z).


--Dan



More information about the Java-patches mailing list