diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-05-21 15:01:59 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-05-21 15:01:59 +0200 |
commit | 0df5ae93e08e17fbe36bfcd1bda8ea24af968a64 (patch) | |
tree | 160aed62a8b7dc8baaecb1c3e3d236c979273971 /gcc/ada/sem_ch13.adb | |
parent | 9db78a423bbd92dfbfcaa5b33b040da21540d647 (diff) | |
download | gcc-0df5ae93e08e17fbe36bfcd1bda8ea24af968a64.zip gcc-0df5ae93e08e17fbe36bfcd1bda8ea24af968a64.tar.gz gcc-0df5ae93e08e17fbe36bfcd1bda8ea24af968a64.tar.bz2 |
[multiple changes]
2014-05-21 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications):
Insert_Delayed_Pragma is now used for the case of Attach_Handler.
* sem_prag.adb: Minor comment improvements.
2014-05-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Install_Body): When checking whether freezing of
instantiation must be delayed, verify that the common enclosing
subprogram to generic and instance is in fact an overloadable
entity.
2014-05-21 Vincent Celier <celier@adacore.com>
* makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
mains with the same name and fail if there is more than one.
* prj.ads, prj.adb (Find_All_Sources): New function
From-SVN: r210702
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 8964bac611..bf42b0e 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -1161,7 +1161,8 @@ package body Sem_Ch13 is procedure Insert_Delayed_Pragma (Prag : Node_Id); -- Insert a postcondition-like pragma into the tree depending on the -- context. Prag must denote one of the following: Pre, Post, Depends, - -- Global or Contract_Cases. + -- Global or Contract_Cases. This procedure is also used for the case + -- of Attach_Handler which has similar requirements for placement. -------------------------------- -- Decorate_Aspect_And_Pragma -- @@ -1463,7 +1464,7 @@ package body Sem_Ch13 is Check_Restriction_No_Specification_Of_Aspect (Aspect); - -- Analyze this aspect (actual analysis is delayed till later) + -- Mark aspect analyzed (actual analysis is delayed till later) Set_Analyzed (Aspect); Set_Entity (Aspect, E); @@ -1678,6 +1679,12 @@ package body Sem_Ch13 is Expression => Relocate_Node (Expr))), Pragma_Name => Name_Attach_Handler); + -- We need to insert this pragma into the tree to get proper + -- processing and to look valid from a placement viewpoint. + + Insert_Delayed_Pragma (Aitem); + goto Continue; + -- Dynamic_Predicate, Predicate, Static_Predicate when Aspect_Dynamic_Predicate | |