6.3.1.3 Signed and unsigned integers

Previous Table of Contents "New C Standard" commentary

682 When a value with integer type is converted to another integer type other than _Bool, if the value can be represented by the new type, it is unchanged.

683 Otherwise, if the new type is unsigned, the value is converted by repeatedly adding or subtracting one more than the maximum value that can be represented in the new type until the value is in the range of the new type.49)

684 Otherwise, the new type is signed and the value cannot be represented in it;

685 either the result is implementation-defined or an implementation-defined signal is raised.

Next

Created at: 2008-01-30 02:39:41 The text from WG14/N1256 is copyright © ISO