From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/gcc~13/long-long.html | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 devdocs/gcc~13/long-long.html (limited to 'devdocs/gcc~13/long-long.html') 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 @@ +

6.10 Double-Word Integers

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 long long int for a signed integer, or unsigned long long int for an unsigned integer. To make an integer constant of type long long int, add the suffix ‘LL’ to the integer. To make an integer constant of type unsigned long +long int, add the suffix ‘ULL’ to the integer.

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.

There may be pitfalls when you use long long types for function arguments without function prototypes. If a function expects type int for its argument, and you pass a value of type long long int, confusion results because the caller and the subroutine disagree about the number of bytes for the argument. Likewise, if the function expects long long int and you pass int. The best way to avoid such problems is to use prototypes.

+

+ © Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
+ https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Long-Long.html +

+
-- cgit v1.2.3