From: Arnaud Charlet Date: Thu, 21 Jan 2021 09:28:16 +0000 (-0500) Subject: [Ada] AI12-0411: Add "bool" to Interfaces.C X-Git-Tag: basepoints/gcc-13~7761 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfcbb5c7417d35b01be76d12078dac06c5aa2494;p=thirdparty%2Fgcc.git [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). --- diff --git a/gcc/ada/libgnarl/s-interr.adb b/gcc/ada/libgnarl/s-interr.adb index b8aa9900c98c..7d36b9f224e3 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 8aef0cab4489..be6b55908c83 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 84b3cf08ebd6..d496b74ce006 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 a78442143a7b..9acfa4927d6b 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 0649d5356e53..9498ca0db5c9 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 088d2253361f..f18c76f59e2b 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 9c445e7dec78..2c60dba56448 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 38558c28906c..5739eaa030b8 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 7c0758a4d7ed..393c2a68b475 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 279c75a27212..5c36245c8f4e 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 1526af07ee2a..42eb578a38ed 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 03ffb0a4f98f..70727b71c675 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