This is the mail archive of the gcc@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]

GCJ/C++ name mangling incompatibility w/ "$"


Bryce McKinlay wrote:

> In the following test case, where we want to pass an inner class
> reference to a native function, GCJ and C++ will produce conflicting
> name manglings. They seem to have different interpretations of the "$"
> character!

The problem is that gcc/java/mangle_name.c is seeing
NO_DOLLAR_IN_LABEL as defined. I think this comes from
gcc/config/elfos.h. This is with the 3.0 branch on i686-pc-linux-gnu.

The C++ name mangler is not honoring this definition, and is using "$"
characters anyway.  That doesn't seem to be a problem in itself, but it
does break ABI compatibility between C++ and Java.

So, who is right? Does C++ need to be fixed to use __U24_ instead of
"$" in mangled names like GCJ does when NO_DOLLAR_IN_LABEL is defined, or
does GCJ need to ignore NO_DOLLAR_IN_LABEL like C++ apparantly does?

regards

  [ bryce ]



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