diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-29 15:38:55 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-29 15:38:55 +0200 |
commit | 3e24afaa6a24e1955ad0f3cd1ca00b6edec67a67 (patch) | |
tree | c5c5a59fe92af48a72ef4d23e699ecfeee3903ef /gcc/ada/sem_util.ads | |
parent | 3ddd922ebf36fb7d4701e8f55e633d27fca54296 (diff) | |
download | gcc-3e24afaa6a24e1955ad0f3cd1ca00b6edec67a67.zip gcc-3e24afaa6a24e1955ad0f3cd1ca00b6edec67a67.tar.gz gcc-3e24afaa6a24e1955ad0f3cd1ca00b6edec67a67.tar.bz2 |
[multiple changes]
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: Remove Build_Explicit_Dereference.
* sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
from sem_res.adb, used in analysis of additional constructs.
(Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
expansion of iterators.
(Is_Object_Reference): Recognize variables rewritten as explicit
dereferences in Ada2012.
* snames.ads-tmpl: Add Has_Element, Forward_Iterator,
Reversible_Iterator names, for expansion of Ada2012 iterators.
* aspects.ads, aspects.adb (Find_Aspect): Utility.
* a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
linked list container.
* a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
* a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
containers.
2011-08-29 Vincent Celier <celier@adacore.com>
* make.adb (Gnatmake): Get the maximum number of simultaneous
compilation processes after the Builder switches has been scanned, as
there may include -jnn.
2011-08-29 Matthew Heaney <heaney@adacore.com>
* a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
GNAT_DRIVER_COMMAND_LINE to 255.
2011-08-29 Pascal Obry <obry@adacore.com>
* freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
reformatting and style fix (class attribute casing).
2011-08-29 Yannick Moy <moy@adacore.com>
* exp_ch11.adb: Yet another case where expansion should be common
between CodePeer and Alfa.
2011-08-29 Yannick Moy <moy@adacore.com>
* exp_ch9.adb: Partial revert of previous change for Alfa mode.
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Matches_Limited_With_View): The limited views of an
incomplete type and its completion match.
From-SVN: r178228
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index bc36fb2..89ae198 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -141,6 +141,15 @@ package Sem_Util is -- the compilation unit, and install it in the Elaboration_Entity field -- of Spec_Id, the entity for the compilation unit. + procedure Build_Explicit_Dereference + (Expr : Node_Id; + Disc : Entity_Id); + -- AI05-139: Names with implicit dereference. If the expression N is a + -- reference type and the context imposes the corresponding designated + -- type, convert N into N.Disc.all. Such expressions are always over- + -- loaded with both interpretations, and the dereference interpretation + -- carries the name of the reference discriminant. + function Cannot_Raise_Constraint_Error (Expr : Node_Id) return Boolean; -- Returns True if the expression cannot possibly raise Constraint_Error. -- The response is conservative in the sense that a result of False does @@ -799,6 +808,13 @@ package Sem_Util is -- E is a subprogram. Return True is E is an implicit operation inherited -- by the derived type declaration for type Typ. + function Is_Iterator (Typ : Entity_Id) return Boolean; + -- AI05-0139-2 : check whether Typ is derived from the predefined interface + -- Ada.Iterator_Interfaces.Forward_Iterator. + + function Is_Reversible_Iterator (Typ : Entity_Id) return Boolean; + -- Ditto for Ada.Iterator_Interfaces.Reversible_Iterator. + function Is_LHS (N : Node_Id) return Boolean; -- Returns True iff N is used as Name in an assignment statement |