This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.1] UCNs in identifiers
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Geoffrey Keating <gkeating at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 7 Jan 2005 15:08:26 +0900
- Subject: Re: [4.1] UCNs in identifiers
- References: <20050107023147.137A820DA57B@geoffk5.apple.com>
Geoffrey Keating wrote:-
>
> This patch implements UCNs in identifiers, as in:
>
> char * \u00fc = "u-umlaut";
>
> int main(void)
> {
> char * \u00fd = "y-acute";
>
> if (\u00fd[0] != 'y' || \u00fc[0] != 'u')
> abort ();
> return 0;
> }
>
> for Darwin. (Actually, not quite, an assembler patch is needed; but
> this is the compiler work.)
>
> I'd commit it right now, but am not quite sure what to do for other
> ports. Darwin works by saying that the input to the assembler is in
> UTF-8. For other ports, the choices are:
>
> (a) Send UTF-8
> (b) Mangle the names somehow
> (c) Refuse UCNs in identifiers on those ports
>
> At present, I'm leaning towards (c). (b) is clearly not the right
> thing, because it's imposing an ABI that might not be the right one.
> (a) is also a possibility, it is certainly the least work.
>
> Any opinions?
Spelling of tokens preserved?
Neil.