From 87003b285389a76fd9bb8a345a36ef2a9ebce0a1 Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Fri, 8 Oct 2010 12:54:03 +0000 Subject: ali.adb: Set Allocator_In_Body if AB parameter present on M line 2010-10-08 Robert Dewar * ali.adb: Set Allocator_In_Body if AB parameter present on M line * ali.ads (Allocator_In_Body): New flag * bcheck.adb (Check_Consistent_Restrictions): Handle case of main program violating No_Allocators_After_Elaboration restriction. * gnatbind.adb (No_Restriction_List): Add entries for No_Anonymous_Allocators, and No_Allocators_After_Elaboration. * lib-load.adb: Initialize Has_Allocator flag * lib-writ.adb: Initialize Has_Allocator flag (M_Parameters): Set AB switch if Has_Allocator flag set * lib-writ.ads: Document AB flag on M line * lib.adb (Has_Allocator): New function (Set_Has_Allocator): New procedure * lib.ads (Has_Allocator): New function (Set_Has_Allocator): New procedure (Has_Allocator): New flag in Unit_Record * sem_ch4.adb (Analyze_Allocator): Add processing for No_Allocators_After_Elaboration. From-SVN: r165171 --- gcc/ada/gnatbind.adb | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'gcc/ada/gnatbind.adb') diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb index 9285aa9..de3084f 100644 --- a/gcc/ada/gnatbind.adb +++ b/gcc/ada/gnatbind.adb @@ -143,34 +143,40 @@ procedure Gnatbind is -- should not be listed. No_Restriction_List : constant array (All_Restrictions) of Boolean := - (No_Exception_Propagation => True, + (No_Allocators_After_Elaboration => True, + -- This involves run-time conditions not checkable at compile time + + No_Anonymous_Allocators => True, + -- Premature, since we have not implemented this yet + + No_Exception_Propagation => True, -- Modifies code resulting in different exception semantics - No_Exceptions => True, + No_Exceptions => True, -- Has unexpected Suppress (All_Checks) effect - No_Implicit_Conditionals => True, + No_Implicit_Conditionals => True, -- This could modify and pessimize generated code - No_Implicit_Dynamic_Code => True, + No_Implicit_Dynamic_Code => True, -- This could modify and pessimize generated code - No_Implicit_Loops => True, + No_Implicit_Loops => True, -- This could modify and pessimize generated code - No_Recursion => True, + No_Recursion => True, -- Not checkable at compile time - No_Reentrancy => True, + No_Reentrancy => True, -- Not checkable at compile time - Max_Entry_Queue_Length => True, + Max_Entry_Queue_Length => True, -- Not checkable at compile time - Max_Storage_At_Blocking => True, + Max_Storage_At_Blocking => True, -- Not checkable at compile time - others => False); + others => False); Additional_Restrictions_Listed : Boolean := False; -- Set True if we have listed header for restrictions -- cgit v1.1