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: [4.1] UCNs in identifiers


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.


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