Re: Support for universal character

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



debugger_gcc <ashay.raut@xxxxxxx> writes:

> For the scenario where i declare a variable as 
> int \uA0A0;          // in a C program
>
> i get an error with message
> error: universal character \uA0A0 is not valid in an identifier
> when compiled using gcc-4.4.1 on linux.
>
> However C99 standards specify only the following constraints on universal
> characters :
>
> Section 6.4.3 ISO/IEC 9899:TC3
> " A universal character name shall not specify a character whose short
> identifier is less than
> 00A0 other than 0024 ($), 0040 (@), or 0060 (‘), nor one in the range D800
> through
> DFFF inclusive.62) "
>
> so why doesnt gcc 4.4.1 throws an error saying "its not valid in an
> identifier"?
> Does gcc enforce some additional constraints regarding the usage of
> universal character in C program?

Those are not the only constraints; section 6.4.2.1 restricts
character names in an identifier to be in one of the ranges in C99
Annex D.  Annex D does not permit A0A0.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux