This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

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


Bryce McKinlay <bryce@albatross.co.nz> writes:

> This is a multi-part message in MIME format.
> --------------A47557F1DA3495C70F7A9118
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> The Java compiler currently mangles "$" characters, which occur in
> inner class names, to "__U24_" if NO_DOLLAR_IN_LABEL is defined. The
> C++ compiler does not do this, resulting in ABI incompatibilities
> between GCJ and C++ compiled code.
> 
> This patch changes GCJ to not do this mangling, matching the behaviour
> of C++. If the C++ compiler is correct here, and "$" should never be
> mangled, then the $ code should be removed entirely from GCJ. Can
> anyone comment on this?
> 
> OK to commit?

If NO_DOLLAR_IN_LABEL is defined, then the C++ compiler should not be
emitting labels with $ characters, right?  Otherwise what would be the
point of defining NO_DOLLAR_IN_LABEL?

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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