Paul Eggert wrote:
> Also, such an approach assumes that unsigned long long int
> has at least as many bits as long long int.  But this is an
> unportable assumption; C99 does not require this.  We have
> run into hosts where the widest signed integer type has much
> greater range than the widest unsigned type.  I hope these
> hosts go away in the long run, but they're in production use
> today.  (The platform I'm thinking of is Tandem NSK/OSS.)

Is this correct?  Doesn't C99's 6.2.5#6 mandate that unsigned
long long int has exactly the same number of bits as long long int?
Perhaps you mean that in Tandem NSK/OSS unsigned long long ints
do not use several bits of the representation?
Am I missing something else?
All the best,

    Roberto


ISO/IEC 9899:1999 6.2.5

[...]

4 There are five standard signed integer types, designated as signed
  char, short int, int, long int, and long long int. [...]

[...]

6 For each of the signed integer types, there is a corresponding (but
  different) unsigned integer type (designated with the keyword
  unsigned) that uses the same amount of storage (including sign
  information) and has the same alignment requirements. [...]

[...]


--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:[EMAIL PROTECTED]

Reply via email to