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]
Other format: [Raw text]

Re: namespace namespace


>>>>> "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


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