summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-17 07:42:04 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-17 07:42:04 +0000
commit16827112ee60f6b6601da6d2d8494025632df4f6 (patch)
tree24565076b0bd54cc2731f9f111de628d53b3aa07 /gcc/ada/sem_ch12.adb
parenta88034c0084be36cf49bbe9b0dbf29ed4eb6b56f (diff)
downloadgcc-16827112ee60f6b6601da6d2d8494025632df4f6.tar.gz
2010-06-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: propagate Pragma_Enabled flag to generic. * get_scos.adb: Set C2 flag in decision entry of pragma to 'e' (enabled) * par_sco.ads, par_sco.adb (Set_SCO_Pragma_Enabled): New procedure Remove use of Node field in SCOs table (Output_Header): Set 'd' to initially disable pragma entry * put_scos.adb (Put_SCOs): New flag indicating if pragma is enabled * scos.ads, scos.adb: Remove Node field from internal SCOs table. Use C2 field of pragma decision header to indicate enabled. * sem_prag.adb: Add calls to Set_SCO_Pragma_Enabled. * gcc-interface/Make-lang.in: Update dependencies. 2010-06-17 Vincent Celier <celier@adacore.com> * back_end.adb (Next_Arg): Moved to procedure Scan_Compiler_Arguments (Scan_Compiler_Arguments): Call Scan_Front_End_Switches with Next_Arg (Switch_Subsequently_Cancelled): Function moved to the body of Switch.C * back_end.ads (Scan_Front_End_Switches): Function moved to the body of Switch.C. * switch-c.adb: Copied a number of global declarations from back_end.adb (Len_Arg): New function copied from back_end.adb (Switch_Subsequently_Cancelled): New function moved from back_end.adb (Scan_Front_End_Switches): New parameter Arg_Rank used to call Switch_Subsequently_Cancelled. * switch-c.ads (Scan_Front_End_Switches): New parameter Arg_Rank. * gcc-interface/Makefile.in: Add line so that shared libgnat is linked with -lexc on Tru64. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160878 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index faff561e22b..db3eac64c93 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -12223,6 +12223,25 @@ package body Sem_Ch12 is
-- All other cases than aggregates
else
+
+ -- For pragmas, we propagate the Enabled status for the
+ -- relevant pragmas to the original generic tree. This was
+ -- originally needed for SCO generation. It is no longer
+ -- needed there (since we use the Sloc value in calls to
+ -- Set_SCO_Pragma_Enabled), but it seems a generally good
+ -- idea to have this flag set properly.
+
+ if Nkind (N) = N_Pragma
+ and then
+ (Pragma_Name (N) = Name_Precondition
+ or else Pragma_Name (N) = Name_Postcondition)
+ and then Present (Associated_Node (Pragma_Identifier (N)))
+ then
+ Set_Pragma_Enabled (N,
+ Pragma_Enabled
+ (Parent (Associated_Node (Pragma_Identifier (N)))));
+ end if;
+
Save_Global_Descendant (Field1 (N));
Save_Global_Descendant (Field2 (N));
Save_Global_Descendant (Field3 (N));