Integers

4.5 Integers

  • Any extended integer types that exist in the implementation (C99 and C11 6.2.5).

    GCC does not support any extended integer types.

  • Whether signed integer types are represented using sign and magnitude, two's complement, or one's complement, and whether the extraordinary value is a trap representation or an ordinary value (C99 and C11 6.2.6.2).

    GCC supports only two's complement integer types, and all bit patterns are ordinary values.

  • The rank of any extended integer type relative to another extended integer type with the same precision (C99 and C11 6.3.1.1).

    GCC does not support any extended integer types.

  • The result of, or the signal raised by, converting an integer to a signed integer type when the value cannot be represented in an object of that type (C90 6.2.1.2, C99 and C11 6.3.1.3).

    For conversion to a type of width N, the value is reduced modulo 2^N to be within range of the type; no signal is raised.

  • The results of some bitwise operations on signed integers (C90 6.3, C99 and C11 6.5).

    Bitwise operators act on the representation of the value including both the sign and value bits, where the sign bit is considered immediately above the highest-value value bit. Signed ‘>>’ acts on negative numbers by sign extension.

    GCC does not use the latitude given in C99 and C11 only to treat certain aspects of signed ‘<<’ as undefined, but this is subject to change.

  • The sign of the remainder on integer division (C90 6.3.5).

    GCC always follows the C99 and C11 requirement that the result of division is truncated towards zero.

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gcc/Integers-implementation.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部