aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-04-25 12:31:36 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-25 12:31:36 +0200
commit5708155960d0abd5f30e12e9477f946c60da43c8 (patch)
tree07a7fa542ef43428eaa03bf75cb41942d3c95bab /gcc/ada/sem_util.ads
parent0812b84e77d5b5d187ea4c75841e4569f016612f (diff)
downloadgcc-5708155960d0abd5f30e12e9477f946c60da43c8.zip
gcc-5708155960d0abd5f30e12e9477f946c60da43c8.tar.gz
gcc-5708155960d0abd5f30e12e9477f946c60da43c8.tar.bz2
[multiple changes]
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch4.adb (Analyze_Quantified_Expression): Add local variable Loop_Id. Verify that the loop variable is used within the condition of the quantified expression. (Referenced): New routine. 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com> * sem_case.adb (Analyze_Choices): Enhance the error message given on a bad use of subtype predicate. * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance the error message given on a bad use of subtype predicate. * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter Suggest_Static. Emit an extra error message advising how to remedy the bad use of the predicate if the context warrants it. * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter Suggest_Static along with a comment explaining its usage. 2013-04-25 Ed Schonberg <schonberg@adacore.com> * sem_disp.adb (Check_Dispatching_Operation): Further refinement to checks for AI05-0125: the check for a hidden primitive that may be overridden by the new declaration only applies if the hidden operation is never declared. This is not the case if the operation is declared in a parent unit. From-SVN: r198288
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r--gcc/ada/sem_util.ads26
1 files changed, 14 insertions, 12 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index fd9b940..c9b5da6 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -122,19 +122,21 @@ package Sem_Util is
-- is an error.
procedure Bad_Predicated_Subtype_Use
- (Msg : String;
- N : Node_Id;
- Typ : Entity_Id);
+ (Msg : String;
+ N : Node_Id;
+ Typ : Entity_Id;
+ Suggest_Static : Boolean := False);
-- This is called when Typ, a predicated subtype, is used in a context
- -- which does not allow the use of a predicated subtype. Msg is passed
- -- to Error_Msg_FE to output an appropriate message using N as the
- -- location, and Typ as the entity. The caller must set up any insertions
- -- other than the & for the type itself. Note that if Typ is a generic
- -- actual type, then the message will be output as a warning, and a
- -- raise Program_Error is inserted using Insert_Action with node N as
- -- the insertion point. Node N also supplies the source location for
- -- construction of the raise node. If Typ is NOT a type with predicates
- -- this call has no effect.
+ -- which does not allow the use of a predicated subtype. Msg is passed to
+ -- Error_Msg_FE to output an appropriate message using N as the location,
+ -- and Typ as the entity. The caller must set up any insertions other than
+ -- the & for the type itself. Note that if Typ is a generic actual type,
+ -- then the message will be output as a warning, and a raise Program_Error
+ -- is inserted using Insert_Action with node N as the insertion point. Node
+ -- N also supplies the source location for construction of the raise node.
+ -- If Typ does not have any predicates, the call has no effect. Set flag
+ -- Suggest_Static when the context warrants an advice on how to avoid the
+ -- use error.
function Build_Actual_Subtype
(T : Entity_Id;