This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: namespace namespace
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, Sam Ruby <rubys at intertwingly dot net>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Thu, 09 Jul 2009 14:23:54 -0600
- Subject: Re: namespace namespace
- References: <4A3D95F1.6040803@intertwingly.net> <4A3E55E1.6010705@redhat.com> <4A403949.4090401@intertwingly.net> <4A40A09E.5040502@redhat.com> <9DAA724F-CC05-4A04-8B4D-386238D1D223@bluezoo.org> <7230133d0906230257j6b69373fj1709af1ee85d7bf8@mail.gmail.com> <4A40B4A1.8020007@intertwingly.net> <4A40CD50.3010904@redhat.com> <4A40DBB9.80703@intertwingly.net> <4A40E497.8090601@redhat.com> <4A4139C1.5060806@intertwingly.net> <4A41EF61.4060902@redhat.com> <4A421391.6020901@intertwingly.net> <4A48FC28.60608@redhat.com> <m3my7gbdqs.fsf@google.com> <4A53A8CE.9040007@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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