https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88039

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot 
Uni-Bielefeld.DE> ---
> --- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery
> dot com> ---
> On Mon, 19 Nov 2018, ro at CeBiTec dot Uni-Bielefeld.DE wrote:
>
>> However, there's another option: C11, 6.4.2.1 General, n.71 suggests
>> 
>> On systems in which linkers cannot accept extended characters, an
>> encoding of the universal character name may be used in forming valid
>> external identifiers. For example, some otherwise unused character or
>> sequence of characters may be used to encode the \u in a universal
>> character name.  Extended characters may produce a long external
>> identifier
>
> Since we don't do any such encoding for C or C++, this is not suitable for 
> any case where the identifiers are meant to be link-compatible with C or 
> C++ (unless we implement such encoding for C and C++ on target OSes that 
> need it, presumably in a way ABI-compatible with how the OSes' own 
> compilers handle UCNs in identifiers if they support that feature, of 
> course).

I've checked the gcc.dg/ucnid-2.c testcase with Studio cc 12.6 and found
the following mapping:

\u00C0                          À       __2cBQhK_
\u00c1                          Á       __2cBQhL_
\u00C2                          Â       __2cBQhM_
wh\u00ff                        whÿ     __2cDwhQjV_
a\u00c4b\u0441\U000003b4e       aÄbсδe  __2cGaQhObQbpXQbkMe_

However, I've no idea how widespread that use is and if it's worth the
trouble to try and implement this given that the Studio compilers won't
see much maintenance and development in the future.

Reply via email to