From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: eggert@twinsun.com Cc: bothner@cygnus.com, egcs@cygnus.com, gcc2@gnu.org Subject: Re: NO_DOLLAR_IN_LABEL Date: Sun, 31 Jan 1999 23:58:00 -0000 Message-id: <199901050847.JAA00587@mira.isdn.cs.tu-berlin.de> References: <199901031928.LAA02125@cygnus.com> <199901042349.AAA03562@mira.isdn.cs.tu-berlin.de> <199901050329.TAA16167@shade.twinsun.com> X-SW-Source: 1999-01n/msg00120.html > I suggested `__9V_' earlier, but `_9' should do if we want something > shorter. __9V will be interpreted as a constructor name of a class with 9 letters. _9 is not a reserved name. > C identifiers that contain universal characters are mangled in a > different way than C++ and Java identifiers. > > This seems unnecessarily confusing to me. Why not use the same > mangling convention for all languages? Maybe the wording was confusing. What I meant is that C++ and Java were covered by gxxint.texi. The manglings will look very similar. The only difference is the prefixing in the entire identifier. For example foo(_tmp,\u1234); becomes foo__F4_tmpU5_1234 under the gxxint.texi mangling, and 'foo' if it is extern "C" (since parameter names are not mangled in C). With a common mangling, we would either get _Ufoo_00f6_00f6F4_00f6tmp1_1234 or _Ufoo_00f6_00f6F8_00f6tmp5_1234 depending on whether the length of the class names have to take the escaped names into account or not. The issue is simply that a C++ mangled identifier is a combination of individual identifiers, which are mangled separately. A C identifier is a single piece, so the we don't have problems with sub-identifiers and indicating their length. > People who write in C++ want to interface to C routines; we'll > simplify their job if we're consistent. And people can do that. If they define a function with extern "C" linkage, they will, of course, get the same mangling as if they write the same identifier in a C program. > By ``universal character'' I assume that you mean ``a \u escape that > has no extended native character equivalent''. Otherwise, the \u > escapes won't unify properly with their native equivalents. Certainly - if unification is performed. Regards, Martin