diff options
author | Arnaud Charlet <charlet@adacore.com> | 2021-01-21 04:28:16 -0500 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-06 03:51:40 -0400 |
commit | cfcbb5c7417d35b01be76d12078dac06c5aa2494 (patch) | |
tree | 7275827cb5d1ec81e35c481c0ea85a2fc76cf2ea | |
parent | 364ffbe34869595a975bc2e812ded6cbdd325ff7 (diff) | |
download | gcc-cfcbb5c7417d35b01be76d12078dac06c5aa2494.zip gcc-cfcbb5c7417d35b01be76d12078dac06c5aa2494.tar.gz gcc-cfcbb5c7417d35b01be76d12078dac06c5aa2494.tar.bz2 |
[Ada] AI12-0411: Add "bool" to Interfaces.C
gcc/ada/
* libgnat/i-c.ads (bool): New type.
* libgnat/i-cexten.ads, libgnat/i-cexten__128.ads (bool): Now
a subtype of Interfaces.C.bool.
* libgnarl/s-interr__vxworks.adb (Interrupt_Manager): Qualify
False.
* libgnarl/s-interr.adb, libgnarl/s-interr__hwint.adb,
libgnarl/s-tasini.adb, libgnarl/s-tasren.adb,
libgnarl/s-tassta.adb, libgnarl/s-tpobmu.adb,
libgnarl/s-tpobop.adb, libgnarl/s-tpopmo.adb: Replace
Assert (False) by Assert (Standard.False).
-rw-r--r-- | gcc/ada/libgnarl/s-interr.adb | 4 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-interr__hwint.adb | 2 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-interr__vxworks.adb | 2 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-tasini.adb | 4 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-tasren.adb | 10 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-tassta.adb | 2 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-tpobmu.adb | 4 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-tpobop.adb | 2 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-tpopmo.adb | 4 | ||||
-rw-r--r-- | gcc/ada/libgnat/i-c.ads | 5 | ||||
-rw-r--r-- | gcc/ada/libgnat/i-cexten.ads | 3 | ||||
-rw-r--r-- | gcc/ada/libgnat/i-cexten__128.ads | 3 |
12 files changed, 24 insertions, 21 deletions
diff --git a/gcc/ada/libgnarl/s-interr.adb b/gcc/ada/libgnarl/s-interr.adb index b8aa990..7d36b9f 100644 --- a/gcc/ada/libgnarl/s-interr.adb +++ b/gcc/ada/libgnarl/s-interr.adb @@ -783,7 +783,7 @@ package body System.Interrupts is null; when others => - pragma Assert (False); + pragma Assert (Standard.False); null; end case; @@ -1228,7 +1228,7 @@ package body System.Interrupts is when X : others => System.IO.Put_Line ("Exception in Interrupt_Manager"); System.IO.Put_Line (Ada.Exceptions.Exception_Information (X)); - pragma Assert (False); + pragma Assert (Standard.False); end; end loop; end Interrupt_Manager; diff --git a/gcc/ada/libgnarl/s-interr__hwint.adb b/gcc/ada/libgnarl/s-interr__hwint.adb index 8aef0ca..be6b559 100644 --- a/gcc/ada/libgnarl/s-interr__hwint.adb +++ b/gcc/ada/libgnarl/s-interr__hwint.adb @@ -1023,7 +1023,7 @@ package body System.Interrupts is null; when others => - pragma Assert (False); + pragma Assert (Standard.False); null; end; end loop; diff --git a/gcc/ada/libgnarl/s-interr__vxworks.adb b/gcc/ada/libgnarl/s-interr__vxworks.adb index 84b3cf0..d496b74 100644 --- a/gcc/ada/libgnarl/s-interr__vxworks.adb +++ b/gcc/ada/libgnarl/s-interr__vxworks.adb @@ -1040,7 +1040,7 @@ package body System.Interrupts is null; when others => - pragma Assert (False); + pragma Assert (Standard.False); null; end; end loop; diff --git a/gcc/ada/libgnarl/s-tasini.adb b/gcc/ada/libgnarl/s-tasini.adb index a784421..9acfa49 100644 --- a/gcc/ada/libgnarl/s-tasini.adb +++ b/gcc/ada/libgnarl/s-tasini.adb @@ -420,7 +420,7 @@ package body System.Tasking.Initialization is when Terminated | Unactivated => - pragma Assert (False); + pragma Assert (Standard.False); null; when Activating @@ -535,7 +535,7 @@ package body System.Tasking.Initialization is C := C.Common.All_Tasks_Link; end loop; - pragma Assert (False); + pragma Assert (Standard.False); end Remove_From_All_Tasks_List; --------------- diff --git a/gcc/ada/libgnarl/s-tasren.adb b/gcc/ada/libgnarl/s-tasren.adb index 0649d53..9498ca0 100644 --- a/gcc/ada/libgnarl/s-tasren.adb +++ b/gcc/ada/libgnarl/s-tasren.adb @@ -165,7 +165,7 @@ package body System.Tasking.Rendezvous is -- Should never get here ??? - pragma Assert (False); + pragma Assert (Standard.False); raise Standard'Abort_Signal; end if; @@ -236,7 +236,7 @@ package body System.Tasking.Rendezvous is -- Should never get here ??? - pragma Assert (False); + pragma Assert (Standard.False); raise Standard'Abort_Signal; end if; @@ -646,7 +646,7 @@ package body System.Tasking.Rendezvous is -- Should never get here ??? - pragma Assert (False); + pragma Assert (Standard.False); raise Standard'Abort_Signal; end if; @@ -1251,7 +1251,7 @@ package body System.Tasking.Rendezvous is -- Should never get here ??? - pragma Assert (False); + pragma Assert (Standard.False); raise Standard'Abort_Signal; end if; @@ -1400,7 +1400,7 @@ package body System.Tasking.Rendezvous is -- Should never get here - pragma Assert (False); + pragma Assert (Standard.False); null; end case; diff --git a/gcc/ada/libgnarl/s-tassta.adb b/gcc/ada/libgnarl/s-tassta.adb index 088d225..f18c76f 100644 --- a/gcc/ada/libgnarl/s-tassta.adb +++ b/gcc/ada/libgnarl/s-tassta.adb @@ -578,7 +578,7 @@ package body System.Tasking.Stages is -- ??? Should never get here - pragma Assert (False); + pragma Assert (Standard.False); raise Standard'Abort_Signal; end if; diff --git a/gcc/ada/libgnarl/s-tpobmu.adb b/gcc/ada/libgnarl/s-tpobmu.adb index 9c445e7..2c60dba 100644 --- a/gcc/ada/libgnarl/s-tpobmu.adb +++ b/gcc/ada/libgnarl/s-tpobmu.adb @@ -38,7 +38,7 @@ package body System.Tasking.Protected_Objects.Multiprocessors is procedure Served (Entry_Call : Entry_Call_Link) is pragma Unreferenced (Entry_Call); begin - pragma Assert (False, "Invalid operation"); + pragma Assert (Standard.False, "Invalid operation"); end Served; ------------------------- @@ -47,7 +47,7 @@ package body System.Tasking.Protected_Objects.Multiprocessors is procedure Wakeup_Served_Entry is begin - pragma Assert (False, "Invalid operation"); + pragma Assert (Standard.False, "Invalid operation"); end Wakeup_Served_Entry; end System.Tasking.Protected_Objects.Multiprocessors; diff --git a/gcc/ada/libgnarl/s-tpobop.adb b/gcc/ada/libgnarl/s-tpobop.adb index 38558c2..5739eaa 100644 --- a/gcc/ada/libgnarl/s-tpobop.adb +++ b/gcc/ada/libgnarl/s-tpobop.adb @@ -601,7 +601,7 @@ package body System.Tasking.Protected_Objects.Operations is when Asynchronous_Call | Timed_Call => - pragma Assert (False); + pragma Assert (Standard.False); null; end case; end if; diff --git a/gcc/ada/libgnarl/s-tpopmo.adb b/gcc/ada/libgnarl/s-tpopmo.adb index 7c0758a..393c2a6 100644 --- a/gcc/ada/libgnarl/s-tpopmo.adb +++ b/gcc/ada/libgnarl/s-tpopmo.adb @@ -208,7 +208,7 @@ package body Monotonic is exit Inner; when others => - pragma Assert (False); + pragma Assert (Standard.False); end case; @@ -292,7 +292,7 @@ package body Monotonic is when 0 | EINTR => null; when others => - pragma Assert (False); + pragma Assert (Standard.False); end case; diff --git a/gcc/ada/libgnat/i-c.ads b/gcc/ada/libgnat/i-c.ads index 279c75a..5c36245 100644 --- a/gcc/ada/libgnat/i-c.ads +++ b/gcc/ada/libgnat/i-c.ads @@ -61,6 +61,11 @@ package Interfaces.C is type size_t is mod 2 ** System.Parameters.ptr_bits; + -- Boolean type + + type bool is new Boolean; + pragma Convention (C, bool); + -- Floating-Point type C_float is new Float; diff --git a/gcc/ada/libgnat/i-cexten.ads b/gcc/ada/libgnat/i-cexten.ads index 1526af0..42eb578 100644 --- a/gcc/ada/libgnat/i-cexten.ads +++ b/gcc/ada/libgnat/i-cexten.ads @@ -56,8 +56,7 @@ package Interfaces.C.Extensions is -- C bool - type bool is new Boolean; - pragma Convention (C, bool); + subtype bool is Interfaces.C.bool; -- 64-bit integer types diff --git a/gcc/ada/libgnat/i-cexten__128.ads b/gcc/ada/libgnat/i-cexten__128.ads index 03ffb0a..70727b7 100644 --- a/gcc/ada/libgnat/i-cexten__128.ads +++ b/gcc/ada/libgnat/i-cexten__128.ads @@ -56,8 +56,7 @@ package Interfaces.C.Extensions is -- C bool - type bool is new Boolean; - pragma Convention (C, bool); + subtype bool is Interfaces.C.bool; -- 64-bit integer types |