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/ali.adb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/ada/ali.adb') diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb index eb45dcaca50..bf7ace87a45 100644 --- a/gcc/ada/ali.adb +++ b/gcc/ada/ali.adb @@ -828,6 +828,7 @@ package body ALI is Sfile => No_File, Task_Dispatching_Policy => ' ', Time_Slice_Value => -1, + Allocator_In_Body => False, WC_Encoding => 'b', Unit_Exception_Table => False, Ver => (others => ' '), @@ -910,6 +911,14 @@ package body ALI is Skip_Space; + if Nextc = 'A' then + P := P + 1; + Checkc ('B'); + ALIs.Table (Id).Allocator_In_Body := True; + end if; + + Skip_Space; + Checkc ('W'); Checkc ('='); ALIs.Table (Id).WC_Encoding := Getc; -- cgit v1.2.1