|
From: | Robert Dewar |
Subject: | Re: GCC optimizes integer overflow: bug or feature? |
Date: | Tue, 19 Dec 2006 08:41:13 -0500 |
User-agent: | Thunderbird 1.5.0.8 (Windows/20061025) |
Florian Weimer wrote:
Something like: GCC does not use the latitude given in C99 only to treat certain aspects of signed @samp{<<} as undefined: If the right operand @var{n} is non-negative and less than the width of the left operand @var{val}, the resulting value @address@hidden << @var{n}} is guaranteed to be equal to @var{val} times 2 to the @var{n}th power under 2-complement arithmetic. would probably settle the issue, but it's unwieldy.
Seems fine to me and completely clear, but in my experience, a lot of people prefer to infer from examples than to read perfectly clear defining text, so I would add an example.
[Prev in Thread] | Current Thread | [Next in Thread] |