diff options
Diffstat (limited to 'devdocs/gcc~13/integers-implementation.html')
| -rw-r--r-- | devdocs/gcc~13/integers-implementation.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/devdocs/gcc~13/integers-implementation.html b/devdocs/gcc~13/integers-implementation.html new file mode 100644 index 00000000..39b22277 --- /dev/null +++ b/devdocs/gcc~13/integers-implementation.html @@ -0,0 +1,12 @@ +<div class="section-level-extent" id="Integers-implementation"> <div class="nav-panel"> <p> Next: <a href="floating-point-implementation" accesskey="n" rel="next">Floating Point</a>, Previous: <a href="characters-implementation" accesskey="p" rel="prev">Characters</a>, Up: <a href="c-implementation" accesskey="u" rel="up">C Implementation-Defined Behavior</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="section" id="Integers"><span>4.5 Integers<a class="copiable-link" href="#Integers"> ¶</a></span></h1> <ul class="itemize mark-bullet"> <li>Any extended integer types that exist in the implementation (C99 and C11 6.2.5). <p>GCC does not support any extended integer types. </p> </li> +<li>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). <p>GCC supports only two’s complement integer types, and all bit patterns are ordinary values. </p> </li> +<li>The rank of any extended integer type relative to another extended integer type with the same precision (C99 and C11 6.3.1.1). <p>GCC does not support any extended integer types. </p> </li> +<li>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). <p>For conversion to a type of width <em class="math">N</em>, the value is reduced modulo <em class="math">2^N</em> to be within range of the type; no signal is raised. </p> </li> +<li>The results of some bitwise operations on signed integers (C90 6.3, C99 and C11 6.5). <p>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 ‘<samp class="samp">>></samp>’ acts on negative numbers by sign extension. </p> <p>As an extension to the C language, GCC does not use the latitude given in C99 and C11 only to treat certain aspects of signed ‘<samp class="samp"><<</samp>’ as undefined. However, <samp class="option">-fsanitize=shift</samp> (and <samp class="option">-fsanitize=undefined</samp>) will diagnose such cases. They are also diagnosed where constant expressions are required. </p> </li> +<li>The sign of the remainder on integer division (C90 6.3.5). <p>GCC always follows the C99 and C11 requirement that the result of division is truncated towards zero. </p> </li> +</ul> </div> <div class="nav-panel"> <p> Next: <a href="floating-point-implementation">Floating Point</a>, Previous: <a href="characters-implementation">Characters</a>, Up: <a href="c-implementation">C Implementation-Defined Behavior</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div><div class="_attribution"> + <p class="_attribution-p"> + © Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br> + <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Integers-implementation.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Integers-implementation.html</a> + </p> +</div> |
