[cfe-dev] confusion with character types

Jochen Wilhelmy j.wilhelmy at arcor.de
Thu Oct 14 07:37:02 PDT 2010


>Perhaps, though I tend to think (apparently not entirely correctly) of
>"char" as being equivalent to either "signed char" or "unsigned char".

This was the same for me until I "discovered" that
char != signed char
char != unsigned char.
The grandfathers of c would have done better having
char, byte and unsigned byte instead (for example)

>In any case there's nothing that clang/libcxx ought to do.  The standard
>is what it is.  (Perhaps a stream which handles signed and/or unsigned
>chars differently would be useful and that seems like a plausible
>extension, but I doubt it's really worth adding.)
no. but as here are compiler and libcxx writers I decided to discuss such
a subtle detail here.
And perhaps it is possible to influence the handling of char types for
standard streams by some traits.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101014/8fc4d711/attachment.html>


More information about the cfe-dev mailing list