[FFmpeg-devel] [RFC] Sechole in gcc 3.3+ and 4.*
Mon Apr 7 15:25:41 CEST 2008
On Mon, Apr 07, 2008 at 04:17:55PM +0300, Uoti Urpala wrote:
> On Mon, 2008-04-07 at 15:02 +0200, Michael Niedermayer wrote:
> > On Mon, Apr 07, 2008 at 03:38:31PM +0300, Uoti Urpala wrote:
> > [...]
> > > ---
> > > Part 6.5 Expressions:
> > > If an exceptional condition occurs during the evaluation of an
> > > expression (that is, if the result is not mathematically defined or not
> > > in the range of representable values for its type), the behavior is
> > > undefined.
> > > ---
> > >
> > > If the sum of signed variables overflows the above applies. The unsigned
> > > behavior of always reducing mod size (which means the result is always
> > > representable) is described elsewhere.
> > Twos complement addition, subtraction and multiplication are identical to
> > their unsigned counterparts. That is they form in isomorphism relative to
> > them.
> C does not require that to be true. It does not require signed numbers
> to be two's complement either.
It does require the implemention to specifiy it:
J.3 Implementation-defined behavior
1 A conforming implementation is required to document its choice of behavior in each of
the areas listed in this subclause. The following are implementation-defined:
-- Whether signed integer types are represented using sign and magnitude, two's
complement, or ones' complement, and whether the extraordinary value is a trap
representation or an ordinary value (18.104.22.168).
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel