[Ada] AI12-0184: Long Long C Data types
authorArnaud Charlet <charlet@adacore.com>
Thu, 30 Jan 2020 09:05:44 +0000 (04:05 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 4 Jun 2020 09:11:20 +0000 (05:11 -0400)
2020-06-04  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* libgnat/i-c.ads (long_long, unsigned_long_long): New
definitions.

gcc/ada/libgnat/i-c.ads

index 1088836..279c75a 100644 (file)
@@ -36,13 +36,15 @@ package Interfaces.C is
    type short is new Short_Integer;
    type long  is range -(2 ** (System.Parameters.long_bits - Integer'(1)))
      .. +(2 ** (System.Parameters.long_bits - Integer'(1))) - 1;
+   type long_long is new Long_Long_Integer;
 
    type signed_char is range SCHAR_MIN .. SCHAR_MAX;
    for signed_char'Size use CHAR_BIT;
 
-   type unsigned       is mod 2 ** int'Size;
-   type unsigned_short is mod 2 ** short'Size;
-   type unsigned_long  is mod 2 ** long'Size;
+   type unsigned           is mod 2 ** int'Size;
+   type unsigned_short     is mod 2 ** short'Size;
+   type unsigned_long      is mod 2 ** long'Size;
+   type unsigned_long_long is mod 2 ** long_long'Size;
 
    type unsigned_char is mod (UCHAR_MAX + 1);
    for unsigned_char'Size use CHAR_BIT;