Commit fb86fe11 by Ed Schonberg Committed by Arnaud Charlet

sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from Process_Bounds...

2011-08-02  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
	Process_Bounds, to perform analysis with expansion of a range or an
	expression that is the iteration scheme for a loop.
	(Analyze_Iterator_Specification): If domain of iteration is given by a
	function call with a controlled result, as is the case if call returns
	a predefined container, ensure that finalization actions are properly
	generated.
	* par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.

From-SVN: r177134
parent 7ea56b23
2011-08-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
Process_Bounds, to perform analysis with expansion of a range or an
expression that is the iteration scheme for a loop.
(Analyze_Iterator_Specification): If domain of iteration is given by a
function call with a controlled result, as is the case if call returns
a predefined container, ensure that finalization actions are properly
generated.
* par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
2011-08-02 Javier Miranda <miranda@adacore.com>
* sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
......
......@@ -2783,11 +2783,17 @@ package body Ch3 is
Set_High_Bound (Range_Node, Expr_Node);
return Range_Node;
-- Otherwise we must have a subtype mark
-- Otherwise we must have a subtype mark, or an Ada 2012 iterator
elsif Expr_Form = EF_Simple_Name then
return Expr_Node;
-- The domain of iteration must be a name. Semantics will determine that
-- the expression has the proper form.
elsif Ada_Version >= Ada_2012 then
return Expr_Node;
-- If incorrect, complain that we expect ..
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment