Email List: Xaustin-review-lX
[All Lists]

Re: Defect in XBD limits.h

To: yyyyyy@xxxxxxxxxxxxx
Subject: Re: Defect in XBD limits.h
From: "Clive D.W. Feather" <yyyyy@xxxxxxxxx>
Date: Thu, 23 Mar 2006 16:43:49 +0000
Cc: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
References: <200603231025.KAA24984@xxxxxx>
yyyyyy@xxxxxxxxxxxxx said:
> XBD limits.h p260 l9174 states that SCHAR_MIN has the value -128
> 
> XBD stddint.h p323, l11535 notes in informative RATIONALE:
> {SCHAR_MIN} has the value -127 or -128.
> 
> I believe that the text in limits.h is incorrect and should concur
> with the informative rationale in stdint.h

Some while ago it was agreed that POSIX would be 8-bit even if the C
Standard wasn't. Hence -127 or -128.

The C Standard allows 2s complement, 1s complement, or sign-and-mag for
signed values. In each case, it allows one bit pattern to be illegal (a
"trap representation" in the jargon) or for all possible bit patterns to be
legal.

-128 implies 2s complement and all patterns legal.
All the five other cases imply -127.

If you decide which of the six cases are to be allowed, the correct
text will be obvious.

-- 
Clive D.W. Feather  | Work:  <yyyyy@xxxxxxxxx>   | Tel:    +44 20 8495 6138
Internet Expert     | Home:  <yyyyy@xxxxxxxxxx>  | Fax:    +44 870 051 9937
Demon Internet      | WWW: http://www.davros.org | Mobile: +44 7973 377646
THUS plc            |                            |

<Prev in Thread] Current Thread [Next in Thread>