namespace namespace

Tom Tromey tromey@redhat.com
Thu Jul 9 20:35:00 GMT 2009


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

>> Note that the demangler currently has a special case for this:
>> /* A Java mangled name may have a trailing '$' if it is a C++
>> keyword.  This '$' is not included in the length count.  We just
>> ignore the '$'.  */
>> if ((di->options & DMGL_JAVA) != 0
>> && d_peek_char (di) == '$')
>> d_advance (di, 1);

Andrew> How interesting.  I didn't know that.

Andrew> I'm pretty sure that it can't possibly have worked, since
Andrew> there would have been no way for CNI code to refer to methods
Andrew> or objects that had name components that were C++ keywords.
Andrew> Unless, perhaps, there was a similar hack in the C++ compiler,
Andrew> but what would have been the point?  Baffling.

Baffling and gcj ... must be my doing!

I don't think I considered namespace components back in the day, only
virtual methods and instance fields.  These were needed to compile
libjava itself (I've long forgotten the examples) and could work
purely by changing gcjh's output.

Tom



More information about the Gcc-patches mailing list