diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-17 07:42:04 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-17 07:42:04 +0000 |
commit | 16827112ee60f6b6601da6d2d8494025632df4f6 (patch) | |
tree | 24565076b0bd54cc2731f9f111de628d53b3aa07 /gcc/ada/sem_prag.adb | |
parent | a88034c0084be36cf49bbe9b0dbf29ed4eb6b56f (diff) | |
download | ppe42-gcc-16827112ee60f6b6601da6d2d8494025632df4f6.tar.gz ppe42-gcc-16827112ee60f6b6601da6d2d8494025632df4f6.zip |
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_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0e8157a875b..147a920ab6c 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -46,6 +46,7 @@ with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Output; use Output; +with Par_SCO; use Par_SCO; with Restrict; use Restrict; with Rident; use Rident; with Rtsfind; use Rtsfind; @@ -1393,9 +1394,12 @@ package body Sem_Prag is Pragma_Misplaced; end if; - -- Record whether pragma is enabled + -- Record if pragma is enabled - Set_Pragma_Enabled (N, Check_Enabled (Pname)); + if Check_Enabled (Pname) then + Set_Pragma_Enabled (N); + Set_SCO_Pragma_Enabled (Loc); + end if; -- If we are within an inlined body, the legality of the pragma -- has been checked already. @@ -5776,8 +5780,12 @@ package body Sem_Prag is -- is to deal with pragma Assert rewritten as a Check pragma. Check_On := Check_Enabled (Chars (Get_Pragma_Arg (Arg1))); - Set_Pragma_Enabled (N, Check_On); - Set_Pragma_Enabled (Original_Node (N), Check_On); + + if Check_On then + Set_Pragma_Enabled (N); + Set_Pragma_Enabled (Original_Node (N)); + Set_SCO_Pragma_Enabled (Loc); + end if; -- If expansion is active and the check is not enabled then we -- rewrite the Check as: |