summaryrefslogtreecommitdiff
path: root/gcc/ada/checks.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-21 10:43:12 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-21 10:43:12 +0000
commit7aafae1c825b10b6c097b4fe10a9496b5c93e3e7 (patch)
tree5512eeac4733915f94ed802b8a68aba0956a37c7 /gcc/ada/checks.ads
parent64ade643f95b4ac26889a6863f81e7dfe50d5e34 (diff)
downloadgcc-7aafae1c825b10b6c097b4fe10a9496b5c93e3e7.tar.gz
2010-10-21 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb: Add handling of predicates. Rework handling of invariants. * exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_ch6.adb: Minor changes to handing of invariants. * par-prag.adb: Add dummy entry for pragma Predicate * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for Predicate aspects. * sem_prag.adb: Add implementation of pragma Predicate. * snames.ads-tmpl: Add entries for pragma Predicate. 2010-10-21 Robert Dewar <dewar@adacore.com> * elists.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165766 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/checks.ads')
-rw-r--r--gcc/ada/checks.ads15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/checks.ads b/gcc/ada/checks.ads
index 1acdab16d48..c544cfe6064 100644
--- a/gcc/ada/checks.ads
+++ b/gcc/ada/checks.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -134,10 +134,10 @@ package Checks is
(N : Node_Id;
Typ : Entity_Id;
No_Sliding : Boolean := False);
- -- Top-level procedure, calls all the others depending on the class of Typ.
- -- Checks that expression N satisfies the constraint of type Typ.
- -- No_Sliding is only relevant for constrained array types, if set to True,
- -- it checks that indexes are in range.
+ -- Top-level procedure, calls all the others depending on the class of
+ -- Typ. Checks that expression N satisfies the constraint of type Typ.
+ -- No_Sliding is only relevant for constrained array types, if set to
+ -- True, it checks that indexes are in range.
procedure Apply_Discriminant_Check
(N : Node_Id;
@@ -153,6 +153,11 @@ package Checks is
-- formals, the check is peformed only if the corresponding actual is
-- constrained, i.e., whether Lhs'Constrained is True.
+ procedure Apply_Predicate_Check (N : Node_Id; Typ : Entity_Id);
+ -- N is an expression to which a predicate check may need to be applied
+ -- for Typ, if Typ has a predicate function. The check is applied only
+ -- if the type of N does not match Typ.
+
function Build_Discriminant_Checks
(N : Node_Id;
T_Typ : Entity_Id)