diff options
author | Ed Schonberg <schonberg@adacore.com> | 2013-10-17 13:54:29 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-17 15:54:29 +0200 |
commit | 51245e2db08facc4d1ce09aa57782b43526c8055 (patch) | |
tree | 0b88e4eff12d32b76d44fc67466e570f14688c6b /gcc/ada/sem_aux.ads | |
parent | 9072f0698d42b378d15906853349780d6564a76b (diff) | |
download | gcc-51245e2db08facc4d1ce09aa57782b43526c8055.zip gcc-51245e2db08facc4d1ce09aa57782b43526c8055.tar.gz gcc-51245e2db08facc4d1ce09aa57782b43526c8055.tar.bz2 |
sem_aux.ads, [...] (Is_Immutably_Limited_Type): Make predicate compatible with Ada 2012 definition
2013-10-17 Ed Schonberg <schonberg@adacore.com>
* sem_aux.ads, sem_aux.adb (Is_Immutably_Limited_Type): Make
predicate compatible with Ada 2012 definition
(Is_Limited_View): New name for previous version of
Is_Immutably_Limited_Type. Predicate is true for an untagged
record type with a limited component.
* exp_ch7.adb, exp_ch6.adb, exp_ch4.adb, exp_ch3.adb, exp_aggr.adb,
sem_util.adb, sem_res.adb, sem_prag.adb, sem_attr.adb, sem_ch8.adb,
sem_ch6.adb, sem_ch3.adb, exp_util.adb: Use Is_Limited_View
* freeze.adb Use Is_Immutably_Limited_Type to check the legality
of references to the current instance, Is_Limited_View otherwise.
From-SVN: r203762
Diffstat (limited to 'gcc/ada/sem_aux.ads')
-rw-r--r-- | gcc/ada/sem_aux.ads | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads index a4b1a67..0e2818e 100644 --- a/gcc/ada/sem_aux.ads +++ b/gcc/ada/sem_aux.ads @@ -281,6 +281,12 @@ package Sem_Aux is -- so. False for other type entities, or any entities that are not types. function Is_Immutably_Limited_Type (Ent : Entity_Id) return Boolean; + -- Implements definition in Ada 2012 RM-7.5 (8.1/3). This differs from the + -- following predicate in that an untagged record with immutably limited + -- components is NOT by itself immutably limited. This matters, eg. when + -- checking the legality of an access to the current instance. + + function Is_Limited_View (Ent : Entity_Id) return Boolean; -- Ent is any entity. True for a type that is "inherently" limited (i.e. -- cannot become nonlimited). From the Ada 2005 RM-7.5(8.1/2), "a type with -- a part that is of a task, protected, or explicitly limited record type". @@ -294,7 +300,8 @@ package Sem_Aux is -- Ent is any entity. Returns true if Ent is a limited type (limited -- private type, limited interface type, task type, protected type, -- composite containing a limited component, or a subtype of any of - -- these types). + -- these types). This older routine overlaps with the previous one, this + -- should be cleaned up? function Nearest_Ancestor (Typ : Entity_Id) return Entity_Id; -- Given a subtype Typ, this function finds out the nearest ancestor from |