William A. Rowe, Jr. wrote:
Lucian Adrian Grijincu wrote:
On Fri, May 2, 2008 at 2:18 AM, Roy T. Fielding <[EMAIL PROTECTED]> wrote:
Why? The type char is defined by the C standard to be an 8bit signed integer. The type unsigned char is defined to be an 8bit unsigned integer. Why would
 we want to add a bunch of unnecessary casting?

Not quite: http://home.att.net/~jackklein/c/inttypes.html

That doesn't resolve Roy's question of "why overload signed char and
unsigned char"?

Can anyone point to a platform where int8_t/uint8_t != signed/unsigned char?

When using HP C on HP-UX/PA (but not IPF), int8_t is a typedef
for plain char.

$ cat t.c && uname -sr && cc -V -c t.c
#include <inttypes.h>

int main () {
    int8_t *p;
    p = (signed char*)0;
}
HP-UX B.11.11
cpp.ansi: HP92453-01 B.11.11.16 HP C Preprocessor (ANSI)
ccom: HP92453-01 B.11.11.16 HP C Compiler
cc: "t.c", line 5: warning 604: Pointers are not assignment-compatible.

Martin

Reply via email to