🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #10

Re: What is the value of `(unsigned) -1' ??

#10
From: John F. Woods
Date: Tue, 27 Oct 1992 17:34
12 lines
1000 bytes
jos@and.nl (Jos Horsmeier) writes:
>On (normal?) two complement implementations nothing happens, i.e.
>the bit pattern remains the same as it was. If the size of an
>unsigned int is larger than the size of a signed int, there will
>occur sign bit extension, e.g. sizeof(int) = 2; sizeof(unsigned int) = 4.

3.1.2.5 Types "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."

(_italic_ *bold*)
Technical Details
Message-ID: <17583@ksr.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!eff!world!ksr!jfw
References: <1992Oct27.071744.4871@netcom.com> <3745@dozo.and.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!eff!world!ksr!jfw
From: jfw@ksr.com (John F. Woods)
Newsgroups: comp.std.c
Subject: Re: What is the value of `(unsigned) -1' ??
Message-ID: <17583@ksr.com>
Date: 27 Oct 92 12:34:34 EST
References: <1992Oct27.071744.4871@netcom.com> <3745@dozo.and.nl>
Sender: news@ksr.com
Lines: 12