diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/gcc~13/long-long.html | |
new repository
Diffstat (limited to 'devdocs/gcc~13/long-long.html')
| -rw-r--r-- | devdocs/gcc~13/long-long.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/devdocs/gcc~13/long-long.html b/devdocs/gcc~13/long-long.html new file mode 100644 index 00000000..43fc609c --- /dev/null +++ b/devdocs/gcc~13/long-long.html @@ -0,0 +1,7 @@ +<div class="section-level-extent" id="Long-Long"> <div class="nav-panel"> <p> Next: <a href="complex" accesskey="n" rel="next">Complex Numbers</a>, Previous: <a href="_005f_005fint128" accesskey="p" rel="prev">128-bit Integers</a>, Up: <a href="c-extensions" accesskey="u" rel="up">Extensions to the C Language Family</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="Double-Word-Integers"><span>6.10 Double-Word Integers<a class="copiable-link" href="#Double-Word-Integers"> ¶</a></span></h1> <p>ISO C99 and ISO C++11 support data types for integers that are at least 64 bits wide, and as an extension GCC supports them in C90 and C++98 modes. Simply write <code class="code">long long int</code> for a signed integer, or <code class="code">unsigned long long int</code> for an unsigned integer. To make an integer constant of type <code class="code">long long int</code>, add the suffix ‘<samp class="samp">LL</samp>’ to the integer. To make an integer constant of type <code class="code">unsigned long +long int</code>, add the suffix ‘<samp class="samp">ULL</samp>’ to the integer. </p> <p>You can use these types in arithmetic like any other integer types. Addition, subtraction, and bitwise boolean operations on these types are open-coded on all types of machines. Multiplication is open-coded if the machine supports a fullword-to-doubleword widening multiply instruction. Division and shifts are open-coded only on machines that provide special support. The operations that are not open-coded use special library routines that come with GCC. </p> <p>There may be pitfalls when you use <code class="code">long long</code> types for function arguments without function prototypes. If a function expects type <code class="code">int</code> for its argument, and you pass a value of type <code class="code">long long int</code>, confusion results because the caller and the subroutine disagree about the number of bytes for the argument. Likewise, if the function expects <code class="code">long long int</code> and you pass <code class="code">int</code>. The best way to avoid such problems is to use prototypes. </p> </div> <div class="nav-panel"> <p> Next: <a href="complex">Complex Numbers</a>, Previous: <a href="_005f_005fint128">128-bit Integers</a>, Up: <a href="c-extensions">Extensions to the C Language Family</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/Long-Long.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Long-Long.html</a> + </p> +</div> |
