Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #91455

Re: unsigned int

From Ike Naar <ike@iceland.freeshell.org>
Newsgroups comp.lang.c
Subject Re: unsigned int
Date 2016-08-01 06:01 +0000
Organization A noiseless patient Spider
Message-ID <slrn3vfsnptpcs.ssv.ike@iceland.freeshell.org> (permalink)
References <unsigned-20160731163521@ram.dialup.fu-berlin.de> <kfnshupl6se.fsf@x-alumni2.alumni.caltech.edu>

Show all headers | View raw


On 2016-07-31, Tim Rentsch <txr@alumni.caltech.edu> wrote:
> The most obvious difference between signed types and unsigned
> types (not counting that only signed types can be negative) is
> that operating on and converting to unsigned types is always
> defined behavior, whereas operating on or converting to signed
> types is sometimes undefined or implementation-defined behavior.

Nit: a shift operation on unsigned types has undefined behavour if
the value of the right operand is greater than or equal to the
width of the promoted left operand (6.5.7p3).

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: unsigned int Tim Rentsch <txr@alumni.caltech.edu> - 2016-07-31 16:36 -0700
  Re: unsigned int Ike Naar <ike@iceland.freeshell.org> - 2016-08-01 06:01 +0000
    Re: unsigned int Tim Rentsch <txr@alumni.caltech.edu> - 2016-08-01 07:27 -0700

csiph-web