diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-13 11:33:37 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-13 11:33:37 +0100 |
commit | ef74daead6d1668980566524b3a49dcc8f51295c (patch) | |
tree | 16e64aeaef0f64c0a97694cfa8298fdfe76681cd /gcc/ada/par-ch4.adb | |
parent | da9683f4dbc85066c290798a14d1158f804f92a2 (diff) | |
download | gcc-ef74daead6d1668980566524b3a49dcc8f51295c.zip gcc-ef74daead6d1668980566524b3a49dcc8f51295c.tar.gz gcc-ef74daead6d1668980566524b3a49dcc8f51295c.tar.bz2 |
[multiple changes]
2017-01-13 Gary Dismukes <dismukes@adacore.com>
* sem_ch13.adb: Minor reformatting and typo fix.
2017-01-13 Ed Schonberg <schonberg@adacore.com>
* par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
Iterated_Component_Association is a named association in an
array aggregate.
* sem_aggr.adb (Resolve_Iterated_Component_Association): New
procedure, subsidiary of Resolve_Array_Aggregate, to analyze
and resolve the discrete choices and the expression of the
new construct.
* sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
Loop_Actions and Box_Present are attributes of
N_Iterated_Component_Association nodes. Box_Present is always
False in this case.
* sprint.adb (Sprint_Node): An Iterated_Component_Association
has a Discrete_Choices list, as specified in the RM. A
Component_Association for aggregate uses instead a Choices list.
We have to live with this small inconsistency because the new
construct also has a defining identifier, and there is no way
to merge the two node structures.
From-SVN: r244410
Diffstat (limited to 'gcc/ada/par-ch4.adb')
-rw-r--r-- | gcc/ada/par-ch4.adb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index 7bbd48b..f52b6ad 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -1490,7 +1490,14 @@ package body Ch4 is -- Assume positional case if comma, right paren, or literal or -- identifier or OTHERS follows (the latter cases are missing -- comma cases). Also assume positional if a semicolon follows, - -- which can happen if there are missing parens + -- which can happen if there are missing parens. + + elsif Nkind (Expr_Node) = N_Iterated_Component_Association then + if No (Assoc_List) then + Assoc_List := New_List (Expr_Node); + else + Append_To (Assoc_List, Expr_Node); + end if; elsif Token = Tok_Comma or else Token = Tok_Right_Paren @@ -1500,8 +1507,8 @@ package body Ch4 is then if Present (Assoc_List) then Error_Msg_BC -- CODEFIX - ("""='>"" expected (positional association cannot follow " & - "named association)"); + ("""='>"" expected (positional association cannot follow " + & "named association)"); end if; if No (Expr_List) then |