aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_case.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-10-10 13:07:30 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-10-10 13:07:30 +0200
commit9e92ad49739943c6c8dcf6aec4b6eddf90020da4 (patch)
tree66741dec73e462fb9efa97c849b3b2901f4d669e /gcc/ada/sem_case.ads
parent11d59a86830fe41e96a652762c210649bdb549a2 (diff)
downloadgcc-9e92ad49739943c6c8dcf6aec4b6eddf90020da4.zip
gcc-9e92ad49739943c6c8dcf6aec4b6eddf90020da4.tar.gz
gcc-9e92ad49739943c6c8dcf6aec4b6eddf90020da4.tar.bz2
[multiple changes]
2013-10-10 Robert Dewar <dewar@adacore.com> * exp_ch3.adb (Expand_N_Variant_Part): Expand statically predicated subtype which appears in Discrete_Choices list. * exp_ch5.adb (Expand_N_Case_Statement): Expand statically predicated subtype which appears in Discrete_Choices list of case statement alternative. * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New procedure. * sem_case.adb: Minor reformatting (Analyze_Choices): Don't expand out Discrete_Choices that are names of subtypes with static predicates. This is now done in the analyzer so that the -gnatct tree is properly formed for ASIS. * sem_case.ads (Generic_Choices_Processing): Does not apply to aggregates any more, so change doc accordingly, and remove unneeded Get_Choices argument. * sem_ch3.adb (Analyze_Variant_Part): Remove no longer used Get_Choices argument in instantiation of Generic_Choices_Processing. * sem_ch4.adb (Analyze_Case_Expression): Remove no longer used Get_Choices argument in instantiation of Generic_Choices_Processing. * sem_ch5.adb (Analyze_Case_Statement): Remove no longer used Get_Choices argument in instantiation of Generic_Choices_Processing. * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative, document that choices that are names of statically predicated subtypes are expanded in the code generation tree passed to the back end, but not in the ASIS tree generated for -gnatct. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch7.adb: Revert previous change. 2013-10-10 Gary Dismukes <dismukes@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where the Storage_Pool aspect is specified by an aspect clause and a renaming is used to capture the evaluation of the pool name, insert the renaming in front of the aspect's associated entity declaration rather than in front of the corresponding attribute definition (which hasn't been appended to the declaration list yet). 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Is_Interface_Conformant): The controlling type of the interface operation is obtained from the ultimate alias of the interface primitive parameter, because that may be in fact an implicit inherited operation whose signature involves the type extension and not the desired interface. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012, recognize an aspect specification with a misspelled name if it is followed by a a comma or semicolon. 2013-10-10 Vadim Godunko <godunko@adacore.com> * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb: Fix copyright notice. 2013-10-10 Yannick Moy <moy@adacore.com> * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get enclosing subprogram for precondition/postcondition/contract cases. From-SVN: r203350
Diffstat (limited to 'gcc/ada/sem_case.ads')
-rw-r--r--gcc/ada/sem_case.ads36
1 files changed, 15 insertions, 21 deletions
diff --git a/gcc/ada/sem_case.ads b/gcc/ada/sem_case.ads
index ccee41f..d788afe 100644
--- a/gcc/ada/sem_case.ads
+++ b/gcc/ada/sem_case.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1996-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2013, 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- --
@@ -40,28 +40,22 @@ package Sem_Case is
generic
with function Get_Alternatives (N : Node_Id) return List_Id;
- -- Function needed to get to the actual list of case statement
- -- alternatives, or array aggregate component associations or
- -- record variants from which we can then access the actual lists
- -- of discrete choices. N is the node for the original construct
- -- i.e. a case statement, an array aggregate or a record variant.
-
- with function Get_Choices (A : Node_Id) return List_Id;
- -- Given a case statement alternative, array aggregate component
- -- association or record variant A we need different access functions
- -- to get to the actual list of discrete choices.
+ -- Function used to get the list of case statement alternatives or
+ -- record variants, from which we can then access the actual lists of
+ -- discrete choices. N is the node for the original construct (case
+ -- statement or a record variant).
with procedure Process_Empty_Choice (Choice : Node_Id);
- -- Processing to carry out for an empty Choice
+ -- Processing to carry out for an empty Choice. Set to No_Op (declared
+ -- above) if no such processing is required.
with procedure Process_Non_Static_Choice (Choice : Node_Id);
-- Processing to carry out for a non static Choice
with procedure Process_Associated_Node (A : Node_Id);
- -- Associated with each case alternative, aggregate component
- -- association or record variant A there is a node or list of nodes
- -- that need semantic processing. This routine implements that
- -- processing.
+ -- Associated with each case alternative or record variant A there is
+ -- a node or list of nodes that need semantic processing. This routine
+ -- implements that processing.
package Generic_Choices_Processing is
@@ -70,12 +64,12 @@ package Sem_Case is
Subtyp : Entity_Id;
Raises_CE : out Boolean;
Others_Present : out Boolean);
- -- From a case expression, case statement, array aggregate or record
- -- variant N, this routine analyzes the corresponding list of discrete
- -- choices. Subtyp is the subtype of the discrete choices. The type
- -- against which the discrete choices must be resolved is its base type.
+ -- From a case expression, case statement, or record variant N, this
+ -- routine analyzes the corresponding list of discrete choices. Subtyp
+ -- is the subtype of the discrete choices. The type against which the
+ -- discrete choices must be resolved is its base type.
--
- -- In one of the bounds of a discrete choice raises a constraint
+ -- If one of the bounds of a discrete choice raises a constraint
-- error the flag Raise_CE is set.
--
-- Finally Others_Present is set to True if an Others choice is present