summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2014-07-29 13:00:08 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-29 15:00:08 +0200
commit96e90ac1ec8cb9261093e434c88cced5d5675e2b (patch)
tree3e0836e2432482756fcd199eecdab0169bd974f4 /gcc/ada/sem_ch4.adb
parentedab608853d34224b204dc42d751a3f90daabe39 (diff)
downloadgcc-96e90ac1ec8cb9261093e434c88cced5d5675e2b.tar.gz
gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
2014-07-29 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old. * opt.adb: Handle Uneval_Old. * opt.ads (Uneval_Old, Uneval_Old_Config): New variables. * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old. * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry. * sem_attr.adb (Uneval_Old_Msg): New procedure. * sem_ch8.adb (Push_Scope): Save Uneval_Old. (Pop_Scope): Restore Uneval_Old. * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old): Implemented. * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old Add entries for Name_Warn, Name_Allow. From-SVN: r213160
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 81d3841c86a..7f9f086ad8c 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -644,7 +644,7 @@ package body Sem_Ch4 is
-- a similar test should be applied to an allocator with a
-- qualified expression ???
- if Is_Protected_Type (Type_Id) then
+ if Has_Protected (Type_Id) then
Check_Restriction (No_Protected_Type_Allocators, N);
end if;
@@ -737,11 +737,8 @@ package body Sem_Ch4 is
-- Check that an allocator of a nested access type doesn't create a
-- protected object when restriction No_Local_Protected_Objects applies.
- -- We don't have an equivalent to Has_Task for protected types, so only
- -- cases where the designated type itself is a protected type are
- -- currently checked. ???
- if Is_Protected_Type (Designated_Type (Acc_Type))
+ if Has_Protected (Designated_Type (Acc_Type))
and then not Is_Library_Level_Entity (Acc_Type)
then
Check_Restriction (No_Local_Protected_Objects, N);