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: [PATCH] PR18785: Support non-native execution charsets


On Wed, 22 Dec 2004, Roger Sayle wrote:

> But for the wording we presumably continue to support target/execution
> characters sets that contain embedded NULs (zero bytes), in which case

They were already disallowed in C90, the authors thereof just hadn't 
considered that in the presence of non-prefix-free character sets it was 
also necessary to disallow NUL characters as the first character of a 
multibyte character, then it was ruled that character sets need not be 
prefix-free.

> This issue is not just one of locale, but of the native character set
> support.  On all platforms considered by DR#274, characters are treated
> as unsigned char, but the encoding of those unsigned chars is not (yet)

Characters are treated as unsigned char because the C standard says they 
are.  For strcmp, for example, this is 7.21.4 paragraph 1.  I referenced 
that DR for its collection of references to the locations of the 
pre-existing requirements to operate on single-byte characters, not for 
its resolution which simply deals with the problem of trap representations 
of signed char.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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