This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: proposed Opengroup action for c99 command (XCU ERN 76)
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: rridge at csclub dot uwaterloo dot ca (Ross Ridge)
- Cc: gcc at gcc dot gnu dot org
- Date: 25 Sep 2005 21:39:17 -0700
- Subject: Re: proposed Opengroup action for c99 command (XCU ERN 76)
- References: <20050923010904.40974A85B6@perpugilliam.csclub.uwaterloo.ca>
rridge@csclub.uwaterloo.ca (Ross Ridge) writes:
> >The POSIXy way to do that would be to refer to the LC_CHARSET
> >environment variable, but then consider
> >
> >LC_CHARSET=UTF-16 c99 foo.c
> >
> >where 'foo.c' is in UTF-16 and contains '#include <stdio.h>',
>
> Not really a problem for a number of reasons. First, it's LC_CTYPE
> you're thinking of. Second, the narrow character set can only be 16-bits
> wide if "char" is 16-bits. Thirdly, if the character set that LC_CTYPE
> selects isn't superset of the POSIX portable character set then result
> is undefined. So if <stdio.h> happens to writen using characters only
> from C basic character set (which is a subset of the portable character
> set), there isn't a problem.
My concern would be that it would be written using only characters
"from the basic C character set", but the actual byte values that
represent those characters might differ. For instance, if POSIX
allows LC_CTYPE=EBCDIC (or equivalent).