From: Arnaud Charlet Date: Thu, 25 Jun 2020 08:02:29 +0000 (-0400) Subject: [Ada] Remove support for -gnatP and pragma Polling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2341c8a96dbef8a6cbc2ce02acf17e6710457f4e;p=gcc.git [Ada] Remove support for -gnatP and pragma Polling gcc/ada/ * Makefile.rtl, gnat1drv.adb, expander.adb doc/gnat_rm/implementation_defined_pragmas.rst, doc/gnat_ugn/building_executable_programs_with_gnat.rst, doc/gnat_ugn/the_gnat_compilation_model.rst, exp_ch5.ads, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_util.adb, exp_util.ads, libgnarl/s-osinte__aix.adb, libgnarl/s-osinte__android.adb, libgnarl/s-osinte__darwin.adb, libgnarl/s-osinte__gnu.adb, libgnarl/s-osinte__hpux-dce.adb, libgnarl/s-osinte__lynxos178.adb, libgnarl/s-osinte__posix.adb, libgnarl/s-osinte__qnx.adb, libgnarl/s-osinte__rtems.adb, libgnarl/s-osinte__solaris.adb, libgnarl/s-osinte__vxworks.adb, libgnarl/s-osinte__x32.adb, libgnarl/s-solita.adb, libgnarl/s-taasde.adb, libgnarl/s-taprob.adb, libgnarl/s-taprop__dummy.adb, libgnarl/s-taprop__hpux-dce.adb, libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb, libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__qnx.adb, libgnarl/s-taprop__solaris.adb, libgnarl/s-taprop__vxworks.adb, libgnarl/s-tarest.adb, libgnarl/s-tasini.adb, libgnarl/s-taskin.adb, libgnarl/s-taspri__dummy.ads, libgnarl/s-taspri__hpux-dce.ads, libgnarl/s-taspri__lynxos.ads, libgnarl/s-taspri__mingw.ads, libgnarl/s-taspri__posix-noaltstack.ads, libgnarl/s-taspri__posix.ads, libgnarl/s-taspri__solaris.ads, libgnarl/s-taspri__vxworks.ads, libgnarl/s-tassta.adb, libgnarl/s-tasuti.adb, libgnarl/s-tposen.adb, libgnat/a-except.adb, libgnat/a-except.ads, libgnat/s-dwalin.adb, libgnat/s-dwalin.ads, libgnat/s-mastop.ads, libgnat/s-soflin.adb, libgnat/s-stalib.adb, libgnat/s-stalib.ads, libgnat/s-stchop.adb, libgnat/s-stchop.ads, libgnat/s-stchop__limit.ads, libgnat/s-traceb.ads, libgnat/s-traent.adb, libgnat/s-traent.ads, libgnat/s-trasym.adb, libgnat/s-trasym.ads, libgnat/s-trasym__dwarf.adb, opt.adb, opt.ads, par-prag.adb, sem_prag.adb, snames.ads-tmpl, switch-c.adb, targparm.adb, targparm.ads, usage.adb: Remove support for -gnatP and pragma Polling. * gnat_ugn.texi: Regenerate. * libgnat/a-excpol.adb, libgnat/a-excpol__abort.adb: Removed. --- diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 62fbd55d156..cd381842100 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -1812,7 +1812,6 @@ endif # HP/PA HP-UX 10 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(target_cpu) $(target_vendor) $(target_os))),) LIBGNAT_TARGET_PAIRS = \ - a-excpol.adb 1 - then - null; - else - Generate_Poll_Call (First (L)); - end if; - end if; - -- Initialize any scalar OUT args if Initialize/Normalize_Scalars if Init_Or_Norm_Scalars and then Is_Subprogram (Spec_Id) then diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 6e9266a2b56..0ff0a15a9dd 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -4919,7 +4919,6 @@ package body Exp_Ch7 is Fin_Id : Entity_Id; Mark : Entity_Id := Empty; New_Decls : List_Id; - Old_Poll : Boolean; begin -- If we are generating expanded code for debugging purposes, use the @@ -4936,12 +4935,6 @@ package body Exp_Ch7 is Loc := No_Location; end if; - -- Set polling off. The finalization and cleanup code is executed - -- with aborts deferred. - - Old_Poll := Polling_Required; - Polling_Required := False; - -- A task activation call has already been built for a task -- allocation block. @@ -5050,10 +5043,6 @@ package body Exp_Ch7 is if Present (Fin_Id) then Build_Finalizer_Call (N, Fin_Id); end if; - - -- Restore saved polling mode - - Polling_Required := Old_Poll; end; end Expand_Cleanup_Actions; diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index b5edb2d5a55..8ef05d4d372 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6198,26 +6198,6 @@ package body Exp_Util is return End_String; end Fully_Qualified_Name_String; - ------------------------ - -- Generate_Poll_Call -- - ------------------------ - - procedure Generate_Poll_Call (N : Node_Id) is - begin - -- No poll call if polling not active - - if not Polling_Required then - return; - - -- Otherwise generate require poll call - - else - Insert_Before_And_Analyze (N, - Make_Procedure_Call_Statement (Sloc (N), - Name => New_Occurrence_Of (RTE (RE_Poll), Sloc (N)))); - end if; - end Generate_Poll_Call; - --------------------------------- -- Get_Current_Value_Condition -- --------------------------------- diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 545e2dabf4e..bde640f5a4b 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -687,10 +687,6 @@ package Exp_Util is -- of entity E, in all upper case, with an ASCII.NUL appended at the end -- of the name if Append_NUL is True. - procedure Generate_Poll_Call (N : Node_Id); - -- If polling is active, then a call to the Poll routine is built, - -- and then inserted before the given node N and analyzed. - procedure Get_Current_Value_Condition (Var : Node_Id; Op : out Node_Kind; diff --git a/gcc/ada/expander.adb b/gcc/ada/expander.adb index b8e86b8b30e..d6219f4a701 100644 --- a/gcc/ada/expander.adb +++ b/gcc/ada/expander.adb @@ -273,9 +273,6 @@ package body Expander is when N_Generic_Instantiation => Expand_N_Generic_Instantiation (N); - when N_Goto_Statement => - Expand_N_Goto_Statement (N); - when N_Handled_Sequence_Of_Statements => Expand_N_Handled_Sequence_Of_Statements (N); diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index a9f48ce997e..26a65fa210d 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -342,10 +342,6 @@ procedure Gnat1drv is Xref_Active := True; - -- Polling mode forced off, since it generates confusing junk - - Polling_Required := False; - -- Set operating mode to Generate_Code to benefit from full front-end -- expansion (e.g. generics). @@ -531,10 +527,6 @@ procedure Gnat1drv is Xref_Active := True; - -- Polling mode forced off, since it generates confusing junk - - Polling_Required := False; - -- Set operating mode to Check_Semantics, but a light front-end -- expansion is still performed. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index ab4719298b1..c98fe761480 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , Jul 01, 2020 +GNAT User's Guide for Native Platforms , Sep 29, 2020 AdaCore @@ -2850,7 +2850,6 @@ Overflow_Mode Overriding_Renamings Partition_Elaboration_Policy Persistent_BSS -Polling Prefix_Exception_Messages Priority_Specific_Dispatching Profile @@ -9721,19 +9720,6 @@ has no effect if cancelled by a subsequent @code{-gnat-p} switch. Cancel effect of previous @code{-gnatp} switch. @end table -@geindex -gnatP (gcc) - - -@table @asis - -@item @code{-gnatP} - -Enable polling. This is required on some systems (notably Windows NT) to -obtain asynchronous abort and asynchronous transfer of control capability. -See @code{Pragma_Polling} in the @cite{GNAT_Reference_Manual} for full -details. -@end table - @geindex -gnatq (gcc) diff --git a/gcc/ada/libgnarl/s-osinte__aix.adb b/gcc/ada/libgnarl/s-osinte__aix.adb index 2370383ec20..91c449401b9 100644 --- a/gcc/ada/libgnarl/s-osinte__aix.adb +++ b/gcc/ada/libgnarl/s-osinte__aix.adb @@ -31,10 +31,6 @@ -- This is a AIX (Native) version of this package -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - package body System.OS_Interface is use Interfaces.C; diff --git a/gcc/ada/libgnarl/s-osinte__android.adb b/gcc/ada/libgnarl/s-osinte__android.adb index 00f0d48445c..5895940574e 100644 --- a/gcc/ada/libgnarl/s-osinte__android.adb +++ b/gcc/ada/libgnarl/s-osinte__android.adb @@ -31,10 +31,6 @@ -- This is an Android version of this package. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. diff --git a/gcc/ada/libgnarl/s-osinte__darwin.adb b/gcc/ada/libgnarl/s-osinte__darwin.adb index 877bcacd970..b57a31a8c9a 100644 --- a/gcc/ada/libgnarl/s-osinte__darwin.adb +++ b/gcc/ada/libgnarl/s-osinte__darwin.adb @@ -31,10 +31,6 @@ -- This is a Darwin Threads version of this package -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - with Interfaces.C.Extensions; package body System.OS_Interface is diff --git a/gcc/ada/libgnarl/s-osinte__gnu.adb b/gcc/ada/libgnarl/s-osinte__gnu.adb index 8da6ce3f11e..dc0f4ecdf88 100644 --- a/gcc/ada/libgnarl/s-osinte__gnu.adb +++ b/gcc/ada/libgnarl/s-osinte__gnu.adb @@ -31,10 +31,6 @@ -- This is the GNU/Hurd version of this package. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. diff --git a/gcc/ada/libgnarl/s-osinte__hpux-dce.adb b/gcc/ada/libgnarl/s-osinte__hpux-dce.adb index 06ec5e67a1f..bcfcf616007 100644 --- a/gcc/ada/libgnarl/s-osinte__hpux-dce.adb +++ b/gcc/ada/libgnarl/s-osinte__hpux-dce.adb @@ -33,10 +33,6 @@ -- This is a DCE version of this package. -- Currently HP-UX and SNI use this file -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. diff --git a/gcc/ada/libgnarl/s-osinte__lynxos178.adb b/gcc/ada/libgnarl/s-osinte__lynxos178.adb index 08ed1784122..79099d76a8d 100644 --- a/gcc/ada/libgnarl/s-osinte__lynxos178.adb +++ b/gcc/ada/libgnarl/s-osinte__lynxos178.adb @@ -31,10 +31,6 @@ -- Version of System.OS_Interface for LynxOS-178 (POSIX Threads) -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It may cause infinite loops and other problems. - package body System.OS_Interface is ------------------ diff --git a/gcc/ada/libgnarl/s-osinte__posix.adb b/gcc/ada/libgnarl/s-osinte__posix.adb index 5ff7ae7a885..48181627208 100644 --- a/gcc/ada/libgnarl/s-osinte__posix.adb +++ b/gcc/ada/libgnarl/s-osinte__posix.adb @@ -32,10 +32,6 @@ -- This version is for POSIX-like operating systems -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. diff --git a/gcc/ada/libgnarl/s-osinte__qnx.adb b/gcc/ada/libgnarl/s-osinte__qnx.adb index b02bc8371ba..45b7ea79651 100644 --- a/gcc/ada/libgnarl/s-osinte__qnx.adb +++ b/gcc/ada/libgnarl/s-osinte__qnx.adb @@ -32,10 +32,6 @@ -- This version is for QNX operating systems -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. diff --git a/gcc/ada/libgnarl/s-osinte__rtems.adb b/gcc/ada/libgnarl/s-osinte__rtems.adb index bfa5cc5d7ee..06cf1abe5d9 100644 --- a/gcc/ada/libgnarl/s-osinte__rtems.adb +++ b/gcc/ada/libgnarl/s-osinte__rtems.adb @@ -40,11 +40,8 @@ -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - with Interfaces.C; use Interfaces.C; + package body System.OS_Interface is ----------------- diff --git a/gcc/ada/libgnarl/s-osinte__solaris.adb b/gcc/ada/libgnarl/s-osinte__solaris.adb index e3bb41e2fdb..adfc3869cc1 100644 --- a/gcc/ada/libgnarl/s-osinte__solaris.adb +++ b/gcc/ada/libgnarl/s-osinte__solaris.adb @@ -35,10 +35,6 @@ -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - with Interfaces.C; use Interfaces.C; package body System.OS_Interface is diff --git a/gcc/ada/libgnarl/s-osinte__vxworks.adb b/gcc/ada/libgnarl/s-osinte__vxworks.adb index d9de5757427..e88a9af30ee 100644 --- a/gcc/ada/libgnarl/s-osinte__vxworks.adb +++ b/gcc/ada/libgnarl/s-osinte__vxworks.adb @@ -34,10 +34,6 @@ -- This package encapsulates all direct interfaces to OS services that are -- needed by children of System. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - package body System.OS_Interface is use type Interfaces.C.int; diff --git a/gcc/ada/libgnarl/s-osinte__x32.adb b/gcc/ada/libgnarl/s-osinte__x32.adb index 80f78253a97..8a7cb4ca872 100644 --- a/gcc/ada/libgnarl/s-osinte__x32.adb +++ b/gcc/ada/libgnarl/s-osinte__x32.adb @@ -32,14 +32,11 @@ -- This version is for Linux/x32 -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. with Interfaces.C; use Interfaces.C; + package body System.OS_Interface is -------------------- diff --git a/gcc/ada/libgnarl/s-solita.adb b/gcc/ada/libgnarl/s-solita.adb index bdd5f9c0a7c..ac3578146fa 100644 --- a/gcc/ada/libgnarl/s-solita.adb +++ b/gcc/ada/libgnarl/s-solita.adb @@ -33,11 +33,6 @@ pragma Style_Checks (All_Checks); -- Turn off subprogram alpha ordering check, since we group soft link bodies -- and dummy soft link bodies together separately in this unit. -pragma Polling (Off); --- Turn polling off for this package. We don't need polling during any of the --- routines in this package, and more to the point, if we try to poll it can --- cause infinite loops. - with Ada.Exceptions; with Ada.Exceptions.Is_Null_Occurrence; diff --git a/gcc/ada/libgnarl/s-taasde.adb b/gcc/ada/libgnarl/s-taasde.adb index dc7dac16cca..9c4340c62cf 100644 --- a/gcc/ada/libgnarl/s-taasde.adb +++ b/gcc/ada/libgnarl/s-taasde.adb @@ -29,10 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - with Ada.Unchecked_Conversion; with Ada.Task_Identification; diff --git a/gcc/ada/libgnarl/s-taprob.adb b/gcc/ada/libgnarl/s-taprob.adb index 3f8a4571298..6ce522a0321 100644 --- a/gcc/ada/libgnarl/s-taprob.adb +++ b/gcc/ada/libgnarl/s-taprob.adb @@ -30,10 +30,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.Task_Primitives.Operations; with System.Soft_Links.Tasking; diff --git a/gcc/ada/libgnarl/s-taprop__dummy.adb b/gcc/ada/libgnarl/s-taprop__dummy.adb index b6fa63bc5b8..7e9093a58fc 100644 --- a/gcc/ada/libgnarl/s-taprop__dummy.adb +++ b/gcc/ada/libgnarl/s-taprop__dummy.adb @@ -34,10 +34,6 @@ -- This package contains all the GNULL primitives that interface directly with -- the underlying OS. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - package body System.Task_Primitives.Operations is use System.Tasking; diff --git a/gcc/ada/libgnarl/s-taprop__hpux-dce.adb b/gcc/ada/libgnarl/s-taprop__hpux-dce.adb index 99049f11b37..0e005118a4e 100644 --- a/gcc/ada/libgnarl/s-taprop__hpux-dce.adb +++ b/gcc/ada/libgnarl/s-taprop__hpux-dce.adb @@ -34,10 +34,6 @@ -- This package contains all the GNULL primitives that interface directly with -- the underlying OS. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with Ada.Unchecked_Conversion; with Interfaces.C; diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb index fb11e0204a4..757a6cdfdad 100644 --- a/gcc/ada/libgnarl/s-taprop__linux.adb +++ b/gcc/ada/libgnarl/s-taprop__linux.adb @@ -34,10 +34,6 @@ -- This package contains all the GNULL primitives that interface directly with -- the underlying OS. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with Interfaces.C; use Interfaces; use type Interfaces.C.int; with System.Task_Info; diff --git a/gcc/ada/libgnarl/s-taprop__mingw.adb b/gcc/ada/libgnarl/s-taprop__mingw.adb index 8fa5435a600..440523101a0 100644 --- a/gcc/ada/libgnarl/s-taprop__mingw.adb +++ b/gcc/ada/libgnarl/s-taprop__mingw.adb @@ -34,10 +34,6 @@ -- This package contains all the GNULL primitives that interface directly with -- the underlying OS. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with Interfaces.C; with Interfaces.C.Strings; diff --git a/gcc/ada/libgnarl/s-taprop__posix.adb b/gcc/ada/libgnarl/s-taprop__posix.adb index c983c77e37e..8ecb2933894 100644 --- a/gcc/ada/libgnarl/s-taprop__posix.adb +++ b/gcc/ada/libgnarl/s-taprop__posix.adb @@ -40,10 +40,6 @@ -- For configurations where SCHED_FIFO and priority ceiling are not a -- requirement, this file can also be used (e.g AiX threads) -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with Ada.Unchecked_Conversion; with Interfaces.C; diff --git a/gcc/ada/libgnarl/s-taprop__qnx.adb b/gcc/ada/libgnarl/s-taprop__qnx.adb index 52d353c5ca0..e3ad521a441 100644 --- a/gcc/ada/libgnarl/s-taprop__qnx.adb +++ b/gcc/ada/libgnarl/s-taprop__qnx.adb @@ -40,10 +40,6 @@ -- For configurations where SCHED_FIFO and priority ceiling are not a -- requirement, this file can also be used (e.g AiX threads) -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with Ada.Unchecked_Conversion; with Interfaces.C; diff --git a/gcc/ada/libgnarl/s-taprop__solaris.adb b/gcc/ada/libgnarl/s-taprop__solaris.adb index 8b0183d7f7d..3084842e919 100644 --- a/gcc/ada/libgnarl/s-taprop__solaris.adb +++ b/gcc/ada/libgnarl/s-taprop__solaris.adb @@ -34,10 +34,6 @@ -- This package contains all the GNULL primitives that interface directly with -- the underlying OS. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with Interfaces.C; with System.Multiprocessors; diff --git a/gcc/ada/libgnarl/s-taprop__vxworks.adb b/gcc/ada/libgnarl/s-taprop__vxworks.adb index 32c301dc8c0..c9d019ef853 100644 --- a/gcc/ada/libgnarl/s-taprop__vxworks.adb +++ b/gcc/ada/libgnarl/s-taprop__vxworks.adb @@ -34,10 +34,6 @@ -- This package contains all the GNULL primitives that interface directly with -- the underlying OS. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with Ada.Unchecked_Conversion; with Interfaces.C; diff --git a/gcc/ada/libgnarl/s-tarest.adb b/gcc/ada/libgnarl/s-tarest.adb index ddaa9839dbb..45551014bf8 100644 --- a/gcc/ada/libgnarl/s-tarest.adb +++ b/gcc/ada/libgnarl/s-tarest.adb @@ -39,10 +39,6 @@ pragma Style_Checks (All_Checks); -- This package represents the high level tasking interface used by the -- compiler to expand Ada 95 tasking constructs into simpler run time calls. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - with Ada.Exceptions; with System.Task_Primitives.Operations; diff --git a/gcc/ada/libgnarl/s-tasini.adb b/gcc/ada/libgnarl/s-tasini.adb index cdcb0ba7534..2080ac28f93 100644 --- a/gcc/ada/libgnarl/s-tasini.adb +++ b/gcc/ada/libgnarl/s-tasini.adb @@ -33,11 +33,6 @@ pragma Style_Checks (All_Checks); -- Turn off subprogram alpha ordering check, since we group soft link bodies -- and dummy soft link bodies together separately in this unit. -pragma Polling (Off); --- Turn polling off for this package. We don't need polling during any of the --- routines in this package, and more to the point, if we try to poll it can --- cause infinite loops. - with System.Task_Primitives; with System.Task_Primitives.Operations; with System.Soft_Links; diff --git a/gcc/ada/libgnarl/s-taskin.adb b/gcc/ada/libgnarl/s-taskin.adb index 1c6ab4a2070..16171c18f50 100644 --- a/gcc/ada/libgnarl/s-taskin.adb +++ b/gcc/ada/libgnarl/s-taskin.adb @@ -29,10 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.Task_Primitives.Operations; with System.Storage_Elements; diff --git a/gcc/ada/libgnarl/s-taspri__dummy.ads b/gcc/ada/libgnarl/s-taspri__dummy.ads index 6428ec93b8d..7d87e22a44f 100644 --- a/gcc/ada/libgnarl/s-taspri__dummy.ads +++ b/gcc/ada/libgnarl/s-taspri__dummy.ads @@ -31,10 +31,6 @@ -- This is a no tasking version of this package -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - package System.Task_Primitives is pragma Preelaborate; diff --git a/gcc/ada/libgnarl/s-taspri__hpux-dce.ads b/gcc/ada/libgnarl/s-taspri__hpux-dce.ads index 65eda3c070e..e5bb2eb3c4e 100644 --- a/gcc/ada/libgnarl/s-taspri__hpux-dce.ads +++ b/gcc/ada/libgnarl/s-taspri__hpux-dce.ads @@ -33,10 +33,6 @@ -- This package provides low-level support for most tasking features -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.OS_Interface; package System.Task_Primitives is diff --git a/gcc/ada/libgnarl/s-taspri__lynxos.ads b/gcc/ada/libgnarl/s-taspri__lynxos.ads index 1e54e4cdb42..36bb3a5f45a 100644 --- a/gcc/ada/libgnarl/s-taspri__lynxos.ads +++ b/gcc/ada/libgnarl/s-taspri__lynxos.ads @@ -32,10 +32,6 @@ -- This is LynxOS Family version of this package. -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.OS_Interface; package System.Task_Primitives is diff --git a/gcc/ada/libgnarl/s-taspri__mingw.ads b/gcc/ada/libgnarl/s-taspri__mingw.ads index ecf0958b9a7..8199a3628c9 100644 --- a/gcc/ada/libgnarl/s-taspri__mingw.ads +++ b/gcc/ada/libgnarl/s-taspri__mingw.ads @@ -31,10 +31,6 @@ -- This is a NT (native) version of this package -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.OS_Interface; with System.Win32; diff --git a/gcc/ada/libgnarl/s-taspri__posix-noaltstack.ads b/gcc/ada/libgnarl/s-taspri__posix-noaltstack.ads index 30475c8ef66..6b1934595bf 100644 --- a/gcc/ada/libgnarl/s-taspri__posix-noaltstack.ads +++ b/gcc/ada/libgnarl/s-taspri__posix-noaltstack.ads @@ -35,10 +35,6 @@ -- Note: this file can only be used for POSIX compliant systems -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.OS_Interface; package System.Task_Primitives is diff --git a/gcc/ada/libgnarl/s-taspri__posix.ads b/gcc/ada/libgnarl/s-taspri__posix.ads index 89a35adefc8..562175473b4 100644 --- a/gcc/ada/libgnarl/s-taspri__posix.ads +++ b/gcc/ada/libgnarl/s-taspri__posix.ads @@ -34,10 +34,6 @@ -- Note: this file can only be used for POSIX compliant systems -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.OS_Interface; package System.Task_Primitives is diff --git a/gcc/ada/libgnarl/s-taspri__solaris.ads b/gcc/ada/libgnarl/s-taspri__solaris.ads index bc451687344..6e963d548c7 100644 --- a/gcc/ada/libgnarl/s-taspri__solaris.ads +++ b/gcc/ada/libgnarl/s-taspri__solaris.ads @@ -33,10 +33,6 @@ -- This package provides low-level support for most tasking features -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with Ada.Unchecked_Conversion; with System.OS_Interface; diff --git a/gcc/ada/libgnarl/s-taspri__vxworks.ads b/gcc/ada/libgnarl/s-taspri__vxworks.ads index 92cd88c1c54..2c7aadd9cd6 100644 --- a/gcc/ada/libgnarl/s-taspri__vxworks.ads +++ b/gcc/ada/libgnarl/s-taspri__vxworks.ads @@ -31,10 +31,6 @@ -- This is a VxWorks version of this package -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.OS_Interface; package System.Task_Primitives is diff --git a/gcc/ada/libgnarl/s-tassta.adb b/gcc/ada/libgnarl/s-tassta.adb index c5940270f6b..aada7347771 100644 --- a/gcc/ada/libgnarl/s-tassta.adb +++ b/gcc/ada/libgnarl/s-tassta.adb @@ -29,10 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - pragma Partition_Elaboration_Policy (Concurrent); -- This package only implements the concurrent elaboration policy. This pragma -- will enforce it (and detect conflicts with user specified policy). diff --git a/gcc/ada/libgnarl/s-tasuti.adb b/gcc/ada/libgnarl/s-tasuti.adb index 90c5bd9935a..6dbd1f06404 100644 --- a/gcc/ada/libgnarl/s-tasuti.adb +++ b/gcc/ada/libgnarl/s-tasuti.adb @@ -33,10 +33,6 @@ -- These declarations are not part of the GNARLI -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - with System.Tasking.Debug; with System.Task_Primitives.Operations; with System.Tasking.Initialization; diff --git a/gcc/ada/libgnarl/s-tposen.adb b/gcc/ada/libgnarl/s-tposen.adb index 3545435f738..eb01580c5f4 100644 --- a/gcc/ada/libgnarl/s-tposen.adb +++ b/gcc/ada/libgnarl/s-tposen.adb @@ -52,10 +52,6 @@ pragma Style_Checks (All_Checks); -- performed at compile time, and is relatively cheap (see PO_Do_Or_Queue, -- Service_Entry). -pragma Polling (Off); --- Turn off polling, we do not want polling to take place during tasking --- operations. It can cause infinite loops and other problems. - pragma Suppress (All_Checks); -- Why is this required ??? diff --git a/gcc/ada/libgnat/a-except.adb b/gcc/ada/libgnat/a-except.adb index 17f3db6e8bc..52e716f2412 100644 --- a/gcc/ada/libgnat/a-except.adb +++ b/gcc/ada/libgnat/a-except.adb @@ -32,10 +32,6 @@ pragma Style_Checks (All_Checks); -- No subprogram ordering check, due to logical grouping -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get --- elaboration circularities with System.Exception_Tables. - with System; use System; with System.Exceptions; use System.Exceptions; with System.Exceptions_Debug; use System.Exceptions_Debug; @@ -668,21 +664,6 @@ package body Ada.Exceptions is Rmsg_36 : constant String := "stream operation not allowed" & NUL; Rmsg_37 : constant String := "build-in-place mismatch" & NUL; - ----------------------- - -- Polling Interface -- - ----------------------- - - type Unsigned is mod 2 ** 32; - - Counter : Unsigned := 0; - pragma Warnings (Off, Counter); - -- This counter is provided for convenience. It can be used in Poll to - -- perform periodic but not systematic operations. - - procedure Poll is separate; - -- The actual polling routine is separate, so that it can easily be - -- replaced with a target dependent version. - -------------------------- -- Code_Address_For_AAA -- -------------------------- diff --git a/gcc/ada/libgnat/a-except.ads b/gcc/ada/libgnat/a-except.ads index 85bb5bd9e88..22b7be94eff 100644 --- a/gcc/ada/libgnat/a-except.ads +++ b/gcc/ada/libgnat/a-except.ads @@ -36,10 +36,6 @@ -- This is the default version of this package. We also have cert and zfp -- versions. -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get --- elaboration circularities with ourself. - with System; with System.Parameters; with System.Standard_Library; @@ -240,31 +236,6 @@ private -- Determine whether the current exception (if it exists) is an instance of -- Standard'Abort_Signal. - ----------------------- - -- Polling Interface -- - ----------------------- - - -- The GNAT compiler has an option to generate polling calls to the Poll - -- routine in this package. Specifying the -gnatP option for a compilation - -- causes a call to Ada.Exceptions.Poll to be generated on every subprogram - -- entry and on every iteration of a loop, thus avoiding the possibility of - -- a case of unbounded time between calls. - - -- This polling interface may be used for instrumentation or debugging - -- purposes (e.g. implementing watchpoints in software or in the debugger). - - -- In the GNAT technology itself, this interface is used to implement - -- immediate asynchronous transfer of control and immediate abort on - -- targets which do not provide for one thread interrupting another. - - -- Note: this used to be in a separate unit called System.Poll, but that - -- caused horrible circular elaboration problems between System.Poll and - -- Ada.Exceptions. - - procedure Poll; - -- Check for asynchronous abort. Note that we do not inline the body. - -- This makes the interface more useful for debugging purposes. - -------------------------- -- Exception_Occurrence -- -------------------------- diff --git a/gcc/ada/libgnat/a-excpol.adb b/gcc/ada/libgnat/a-excpol.adb deleted file mode 100644 index 27893c36a41..00000000000 --- a/gcc/ada/libgnat/a-excpol.adb +++ /dev/null @@ -1,42 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- A D A . E X C E P T I O N S . P O L L -- --- -- --- B o d y -- --- (dummy version where polling is not used) -- --- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- --- -- --- GNARL is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - -separate (Ada.Exceptions) - ----------- --- Poll -- ----------- - -procedure Poll is -begin - null; -end Poll; diff --git a/gcc/ada/libgnat/a-excpol__abort.adb b/gcc/ada/libgnat/a-excpol__abort.adb deleted file mode 100644 index 511f58c2a77..00000000000 --- a/gcc/ada/libgnat/a-excpol__abort.adb +++ /dev/null @@ -1,62 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- A D A . E X C E P T I O N S . P O L L -- --- (version supporting asynchronous abort test) -- --- -- --- B o d y -- --- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- --- -- --- GNARL is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This version is for targets that do not support per-thread asynchronous --- signals. On such targets, we require compilation with the -gnatP switch --- that activates periodic polling. Then in the body of the polling routine --- we test for asynchronous abort. - --- Windows and HPUX 10 currently use this file - -pragma Warnings (Off); --- Allow withing of non-Preelaborated units in Ada 2005 mode where this --- package will be categorized as Preelaborate. See AI-362 for details. --- It is safe in the context of the run-time to violate the rules. - -with System.Soft_Links; - -pragma Warnings (On); - -separate (Ada.Exceptions) - ----------- --- Poll -- ----------- - -procedure Poll is -begin - -- Test for asynchronous abort on each poll - - if System.Soft_Links.Check_Abort_Status.all /= 0 then - raise Standard'Abort_Signal; - end if; -end Poll; diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb index dbd4c5365af..abb499c35cb 100644 --- a/gcc/ada/libgnat/s-dwalin.adb +++ b/gcc/ada/libgnat/s-dwalin.adb @@ -29,10 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we can get --- elaboration circularities when polling is turned on - with Ada.Characters.Handling; with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback; with Ada.Unchecked_Deallocation; diff --git a/gcc/ada/libgnat/s-dwalin.ads b/gcc/ada/libgnat/s-dwalin.ads index 2753be3ec00..072f089509e 100644 --- a/gcc/ada/libgnat/s-dwalin.ads +++ b/gcc/ada/libgnat/s-dwalin.ads @@ -38,10 +38,6 @@ -- size is a consideration it's possible to strip all other .debug sections, -- which will decrease the size of the object significantly. -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we can get --- elaboration circularities when polling is turned on - with Ada.Exceptions.Traceback; with System.Object_Reader; diff --git a/gcc/ada/libgnat/s-mastop.ads b/gcc/ada/libgnat/s-mastop.ads index c2c23d345be..ffe04be7df7 100644 --- a/gcc/ada/libgnat/s-mastop.ads +++ b/gcc/ada/libgnat/s-mastop.ads @@ -31,10 +31,6 @@ pragma Compiler_Unit_Warning; -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get --- elaboration circularities with System.Exception_Tables. - with System.Storage_Elements; package System.Machine_State_Operations is diff --git a/gcc/ada/libgnat/s-soflin.adb b/gcc/ada/libgnat/s-soflin.adb index 7e1a557bdc7..48d133878f3 100644 --- a/gcc/ada/libgnat/s-soflin.adb +++ b/gcc/ada/libgnat/s-soflin.adb @@ -31,10 +31,6 @@ pragma Compiler_Unit_Warning; -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get an --- infinite loop from the code within the Poll routine itself. - pragma Warnings (Off); -- Disable warnings as System.Soft_Links.Initialize is not Preelaborate. It is -- safe to with this unit as its elaboration routine will only be initializing diff --git a/gcc/ada/libgnat/s-stalib.adb b/gcc/ada/libgnat/s-stalib.adb index 61636d10a9f..7c6001384be 100644 --- a/gcc/ada/libgnat/s-stalib.adb +++ b/gcc/ada/libgnat/s-stalib.adb @@ -36,10 +36,6 @@ pragma Compiler_Unit_Warning; -- of System.Standard_Library, since this would cause order of elaboration -- problems (Elaborate_Body would have the same problem). -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get --- elaboration circularities with Ada.Exceptions if polling is on. - pragma Warnings (Off); -- Kill warnings from unused withs. These unused with's are here to make -- sure the relevant units are loaded and properly elaborated. diff --git a/gcc/ada/libgnat/s-stalib.ads b/gcc/ada/libgnat/s-stalib.ads index 5fbedae2e36..b6258ed6ae1 100644 --- a/gcc/ada/libgnat/s-stalib.ads +++ b/gcc/ada/libgnat/s-stalib.ads @@ -46,10 +46,6 @@ pragma Compiler_Unit_Warning; -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get --- elaboration circularities with Ada.Exceptions if polling is on. - with Ada.Unchecked_Conversion; package System.Standard_Library is diff --git a/gcc/ada/libgnat/s-stchop.adb b/gcc/ada/libgnat/s-stchop.adb index c5c3d3555e7..340d27bc631 100644 --- a/gcc/ada/libgnat/s-stchop.adb +++ b/gcc/ada/libgnat/s-stchop.adb @@ -61,8 +61,6 @@ package body System.Stack_Checking.Operations is -- cache is pending, that write should be followed by a Poll to prevent -- losing signals. -- - -- Note: This function must be compiled with Polling turned off - -- -- Note: on systems with real thread-local storage, Set_Stack_Info should -- return an access value for such local storage. In those cases the cache -- will always be up-to-date. diff --git a/gcc/ada/libgnat/s-stchop.ads b/gcc/ada/libgnat/s-stchop.ads index d057ddb5873..185301c3d25 100644 --- a/gcc/ada/libgnat/s-stchop.ads +++ b/gcc/ada/libgnat/s-stchop.ads @@ -36,10 +36,6 @@ pragma Restrictions (No_Elaboration_Code); -- We want to guarantee the absence of elaboration code because the binder -- does not handle references to this package. -pragma Polling (Off); --- Turn off polling, we do not want polling to take place during stack --- checking operations. It causes infinite loops and other problems. - with System.Storage_Elements; package System.Stack_Checking.Operations is diff --git a/gcc/ada/libgnat/s-stchop__limit.ads b/gcc/ada/libgnat/s-stchop__limit.ads index c90460673ba..73306765e47 100644 --- a/gcc/ada/libgnat/s-stchop__limit.ads +++ b/gcc/ada/libgnat/s-stchop__limit.ads @@ -37,10 +37,6 @@ pragma Restrictions (No_Elaboration_Code); -- We want to guarantee the absence of elaboration code because the binder -- does not handle references to this package. -pragma Polling (Off); --- Turn off polling, we do not want polling to take place during stack --- checking operations. It causes infinite loops and other problems. - package System.Stack_Checking.Operations is pragma Preelaborate; diff --git a/gcc/ada/libgnat/s-traceb.ads b/gcc/ada/libgnat/s-traceb.ads index 1c3151cf8de..094218cd6cb 100644 --- a/gcc/ada/libgnat/s-traceb.ads +++ b/gcc/ada/libgnat/s-traceb.ads @@ -35,10 +35,6 @@ pragma Compiler_Unit_Warning; -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get --- elaboration circularities with System.Exception_Tables. - with System.Traceback_Entries; package System.Traceback is diff --git a/gcc/ada/libgnat/s-traent.adb b/gcc/ada/libgnat/s-traent.adb index 950b0e59e2c..23d174faf3f 100644 --- a/gcc/ada/libgnat/s-traent.adb +++ b/gcc/ada/libgnat/s-traent.adb @@ -29,10 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get --- elaboration circularities with Ada.Exceptions. - pragma Compiler_Unit_Warning; package body System.Traceback_Entries is diff --git a/gcc/ada/libgnat/s-traent.ads b/gcc/ada/libgnat/s-traent.ads index fa2db4e37cf..83ef5691dda 100644 --- a/gcc/ada/libgnat/s-traent.ads +++ b/gcc/ada/libgnat/s-traent.ads @@ -38,10 +38,6 @@ -- version of the package, an entry is a mere code location representing the -- address of a call instruction part of the call-chain. -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we get --- elaboration circularities with Ada.Exceptions. - pragma Compiler_Unit_Warning; package System.Traceback_Entries is diff --git a/gcc/ada/libgnat/s-trasym.adb b/gcc/ada/libgnat/s-trasym.adb index 0d6639fef16..bfc3a98c962 100644 --- a/gcc/ada/libgnat/s-trasym.adb +++ b/gcc/ada/libgnat/s-trasym.adb @@ -33,10 +33,6 @@ -- is not supported. It returns tracebacks as lists of hexadecimal addresses -- of the form "0x...". -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we can get --- elaboration circularities when polling is turned on. - with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback; with System.Address_Image; diff --git a/gcc/ada/libgnat/s-trasym.ads b/gcc/ada/libgnat/s-trasym.ads index f0240cd18a2..e974ee9c76b 100644 --- a/gcc/ada/libgnat/s-trasym.ads +++ b/gcc/ada/libgnat/s-trasym.ads @@ -71,10 +71,6 @@ -- executable. You should consider using gdb to obtain symbolic traceback in -- such cases. -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we can get --- elaboration circularities when polling is turned on. - with Ada.Exceptions; package System.Traceback.Symbolic is diff --git a/gcc/ada/libgnat/s-trasym__dwarf.adb b/gcc/ada/libgnat/s-trasym__dwarf.adb index d8e3956be23..78cbcc202c7 100644 --- a/gcc/ada/libgnat/s-trasym__dwarf.adb +++ b/gcc/ada/libgnat/s-trasym__dwarf.adb @@ -31,10 +31,6 @@ -- Run-time symbolic traceback support for targets using DWARF debug data -pragma Polling (Off); --- We must turn polling off for this unit, because otherwise we can get --- elaboration circularities when polling is turned on. - with Ada.Unchecked_Deallocation; with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback; diff --git a/gcc/ada/opt.adb b/gcc/ada/opt.adb index 2d21b56570d..2bdccbde56b 100644 --- a/gcc/ada/opt.adb +++ b/gcc/ada/opt.adb @@ -98,7 +98,6 @@ package body Opt is No_Component_Reordering_Config := No_Component_Reordering; Optimize_Alignment_Config := Optimize_Alignment; Persistent_BSS_Mode_Config := Persistent_BSS_Mode; - Polling_Required_Config := Polling_Required; Prefix_Exception_Messages_Config := Prefix_Exception_Messages; SPARK_Mode_Config := SPARK_Mode; SPARK_Mode_Pragma_Config := SPARK_Mode_Pragma; @@ -139,7 +138,6 @@ package body Opt is Optimize_Alignment := Save.Optimize_Alignment; Optimize_Alignment_Local := Save.Optimize_Alignment_Local; Persistent_BSS_Mode := Save.Persistent_BSS_Mode; - Polling_Required := Save.Polling_Required; Prefix_Exception_Messages := Save.Prefix_Exception_Messages; SPARK_Mode := Save.SPARK_Mode; SPARK_Mode_Pragma := Save.SPARK_Mode_Pragma; @@ -183,7 +181,6 @@ package body Opt is Optimize_Alignment => Optimize_Alignment, Optimize_Alignment_Local => Optimize_Alignment_Local, Persistent_BSS_Mode => Persistent_BSS_Mode, - Polling_Required => Polling_Required, Prefix_Exception_Messages => Prefix_Exception_Messages, SPARK_Mode => SPARK_Mode, SPARK_Mode_Pragma => SPARK_Mode_Pragma, @@ -302,7 +299,6 @@ package body Opt is Default_Pool := Default_Pool_Config; Exception_Locations_Suppressed := Exception_Locations_Suppressed_Config; Fast_Math := Fast_Math_Config; - Polling_Required := Polling_Required_Config; end Set_Config_Switches; end Opt; diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 885a6fb9497..88a1ef412ad 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -1306,11 +1306,6 @@ package Opt is -- GNATBIND -- True if pessimistic elaboration order is to be chosen (-p switch set) - Polling_Required : Boolean := False; - -- GNAT - -- Set to True if polling for asynchronous abort is enabled by using - -- the -gnatP option for GNAT. - Prefix_Exception_Messages : Boolean := False; -- GNAT -- Set True to prefix exception messages with entity-name: @@ -2103,14 +2098,6 @@ package Opt is -- at the start of each compilation unit, except that it is always -- set False for predefined units. - Polling_Required_Config : Boolean; - -- GNAT - -- This is the value of the configuration switch that controls polling - -- mode. It can be set True by the command line switch -gnatP, and then - -- further modified by the use of pragma Polling in the gnat.adc file. This - -- flag is used to set the initial value for Polling_Required at the start - -- of analyzing each unit. - Prefix_Exception_Messages_Config : Boolean; -- The setting of Prefix_Exception_Messages from configuration pragmas @@ -2338,7 +2325,6 @@ private Optimize_Alignment : Character; Optimize_Alignment_Local : Boolean; Persistent_BSS_Mode : Boolean; - Polling_Required : Boolean; Prefix_Exception_Messages : Boolean; SPARK_Mode : SPARK_Mode_Type; SPARK_Mode_Pragma : Node_Id; diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index 265f187206a..120aab5d7da 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -1449,7 +1449,6 @@ begin | Pragma_Partition_Elaboration_Policy | Pragma_Passive | Pragma_Persistent_BSS - | Pragma_Polling | Pragma_Post | Pragma_Post_Class | Pragma_Postcondition diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 7442da1c3f2..52e0e8971e0 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -21054,19 +21054,6 @@ package body Sem_Prag is Map_Pragma_Name (From => Chars (New_Name), To => Chars (Old_Name)); end Rename_Pragma; - ------------- - -- Polling -- - ------------- - - -- pragma Polling (ON | OFF); - - when Pragma_Polling => - GNAT_Pragma; - Check_Arg_Count (1); - Check_No_Identifiers; - Check_Arg_Is_One_Of (Arg1, Name_On, Name_Off); - Polling_Required := (Chars (Get_Pragma_Arg (Arg1)) = Name_On); - ----------------------------------- -- Post/Post_Class/Postcondition -- ----------------------------------- @@ -30942,7 +30929,6 @@ package body Sem_Prag is Pragma_Partition_Elaboration_Policy => 0, Pragma_Passive => 0, Pragma_Persistent_BSS => 0, - Pragma_Polling => 0, Pragma_Post => -1, Pragma_Postcondition => -1, Pragma_Post_Class => -1, diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl index b15d2208e6f..fa5134f972f 100644 --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -453,7 +453,6 @@ package Snames is Name_Overriding_Renamings : constant Name_Id := N + $; -- GNAT Name_Partition_Elaboration_Policy : constant Name_Id := N + $; -- Ada 05 Name_Persistent_BSS : constant Name_Id := N + $; -- GNAT - Name_Polling : constant Name_Id := N + $; -- GNAT Name_Prefix_Exception_Messages : constant Name_Id := N + $; -- GNAT Name_Priority_Specific_Dispatching : constant Name_Id := N + $; -- Ada 05 Name_Profile : constant Name_Id := N + $; -- Ada 05 @@ -1942,7 +1941,6 @@ package Snames is Pragma_Overriding_Renamings, Pragma_Partition_Elaboration_Policy, Pragma_Persistent_BSS, - Pragma_Polling, Pragma_Prefix_Exception_Messages, Pragma_Priority_Specific_Dispatching, Pragma_Profile, diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index c5f2e1cc959..1816808c0cb 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -723,6 +723,7 @@ package body Switch.C is when 'P' => Treat_Categorization_Errors_As_Warnings := True; + Ptr := Ptr + 1; -- -gnates=file (specify extra file switches for gnat2why) @@ -808,8 +809,8 @@ package body Switch.C is -- -gnateu (unrecognized y,V,w switches) when 'u' => - Ptr := Ptr + 1; Ignore_Unrecognized_VWY_Switches := True; + Ptr := Ptr + 1; -- -gnateV (validity checks on parameters) @@ -1154,12 +1155,6 @@ package body Switch.C is Suppress_Options.Overflow_Mode_Assertions := Strict; end if; - -- -gnatP (periodic poll) - - when 'P' => - Ptr := Ptr + 1; - Polling_Required := True; - -- -gnatq (don't quit) when 'q' => diff --git a/gcc/ada/targparm.adb b/gcc/ada/targparm.adb index 9e1571091bf..0be05aec9c9 100644 --- a/gcc/ada/targparm.adb +++ b/gcc/ada/targparm.adb @@ -655,12 +655,6 @@ package body Targparm is Opt.Partition_Elaboration_Policy_Sloc := System_Location; goto Line_Loop_Continue; - -- Polling (On) - - elsif Looking_At_Skip ("pragma Polling (On);") then - Opt.Polling_Required := True; - goto Line_Loop_Continue; - -- Queuing Policy elsif Looking_At_Skip ("pragma Queuing_Policy (") then diff --git a/gcc/ada/targparm.ads b/gcc/ada/targparm.ads index 7f98a1d97da..60b23679d56 100644 --- a/gcc/ada/targparm.ads +++ b/gcc/ada/targparm.ads @@ -101,9 +101,6 @@ package Targparm is -- policy name, and Opt.Task_Dispatching_Policy_Sloc is set to -- System_Location. - -- If a pragma Polling (On) appears, then the flag Opt.Polling_Required - -- is set to True. - -- If a pragma Detect_Blocking appears, then the flag Opt.Detect_Blocking -- is set to True. diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb index 2afd3fc54ea..f9864842d52 100644 --- a/gcc/ada/usage.adb +++ b/gcc/ada/usage.adb @@ -378,11 +378,6 @@ begin Write_Switch_Char ("p"); Write_Line ("Suppress all checks"); - -- Line for -gnatP switch - - Write_Switch_Char ("P"); - Write_Line ("Generate periodic calls to System.Polling.Poll"); - -- Line for -gnatq switch Write_Switch_Char ("q");