packing unsigned char in PVM

Kragen Sitaker kragen at
Tue Jun 27 15:16:21 PDT 2000

Robert Brown writes:
> I thought char was always unsigned.  Signed and unsigned differentiates
> integers (only), or at least so I thought -- reserving the sign bit.
> You should just pack for char, at a guess.

In C, a char is a kind of integer, and so there is such a thing as an
"unsigned char".

In C, "char" can mean either "unsigned char" or "signed char",
depending on the platform.  (Unlike other kinds of integers, which are
always signed by default.)  The ANSI standard added the "signed"
keyword so you could talk about signed chars on architectures where the
default char was unsigned.

Signed chars are a huge rat's nest of bugs.

You should be able to just pack for char.

<kragen at>       Kragen Sitaker     <>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
The power didn't go out on 2000-01-01 either.  :)

More information about the Beowulf mailing list