[FFmpeg-devel] [RFC] Sechole in gcc 3.3+ and 4.*

Michael Niedermayer michaelni
Mon Apr 7 15:02:13 CEST 2008

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
They are mathematically well defined as +,* in Z/nZ with n=2^bits. And their
values are representable, after all the identical opertation called unsigend
has them representable.

If C meant this to be undefined they could have said so explicitly like they
do for >> and signed numbers.


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080407/010cc537/attachment.pgp>

More information about the ffmpeg-devel mailing list