aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch5.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-22 12:26:01 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-22 12:26:01 +0200
commita043e7356e5eb2e7c0c09f0775d7647c8f2a0ece (patch)
tree3a1452e51a811170156c699e84b2cbe12f49dc63 /gcc/ada/par-ch5.adb
parent229db35122a3015db205e642f515593ed1841a00 (diff)
downloadgcc-a043e7356e5eb2e7c0c09f0775d7647c8f2a0ece.zip
gcc-a043e7356e5eb2e7c0c09f0775d7647c8f2a0ece.tar.gz
gcc-a043e7356e5eb2e7c0c09f0775d7647c8f2a0ece.tar.bz2
[multiple changes]
2010-10-22 Thomas Quinot <quinot@adacore.com> * sem_ch3.adb (Complete_Private_Subtype): The full view of the subtype may already have a rep item chain inherited from the full view of the base type, so do not overwrite it when propagating rep items from the partial view of the subtype. * sem_ch3.adb: Minor code reorganization. Minor reformatting. 2010-10-22 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi (gnatmetric): Remove description of debug option. 2010-10-22 Tristan Gingold <gingold@adacore.com> * adaint.c (__gnat_number_of_cpus): Add implementation for VMS. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * par-ch5.adb: Set properly starting sloc of loop parameter. From-SVN: r165818
Diffstat (limited to 'gcc/ada/par-ch5.adb')
-rw-r--r--gcc/ada/par-ch5.adb12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb
index 400b3e1..489707e 100644
--- a/gcc/ada/par-ch5.adb
+++ b/gcc/ada/par-ch5.adb
@@ -1711,11 +1711,19 @@ package body Ch5 is
-- during analysis of the loop parameter specification.
if Token = Tok_Of or else Token = Tok_Colon then
+
+ if Ada_Version < Ada_2012 then
+ Error_Msg_SC ("iterator is an Ada2012 feature");
+ end if;
+
return P_Iterator_Specification (ID_Node);
end if;
+ -- The span of the Loop_Parameter_Specification starts at the
+ -- defining identifier.
+
Loop_Param_Specification_Node :=
- New_Node (N_Loop_Parameter_Specification, Token_Ptr);
+ New_Node (N_Loop_Parameter_Specification, Sloc (ID_Node));
Set_Defining_Identifier (Loop_Param_Specification_Node, ID_Node);
if Token = Tok_Left_Paren then
@@ -1753,7 +1761,7 @@ package body Ch5 is
Node1 : Node_Id;
begin
- Node1 := New_Node (N_Iterator_Specification, Token_Ptr);
+ Node1 := New_Node (N_Iterator_Specification, Sloc (Def_Id));
Set_Defining_Identifier (Node1, Def_Id);
if Token = Tok_Colon then