diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-04-24 16:22:24 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-04-24 16:22:24 +0200 |
commit | 327b1ba4bd731c191f167d74ec3766939ab923de (patch) | |
tree | c51d1d5e40608d6c062f1aca184d31dab70d2f3b /gcc/ada/par-ch4.adb | |
parent | d436b30d99371fec40a60e617f86e3ede5701ac2 (diff) | |
download | gcc-327b1ba4bd731c191f167d74ec3766939ab923de.zip gcc-327b1ba4bd731c191f167d74ec3766939ab923de.tar.gz gcc-327b1ba4bd731c191f167d74ec3766939ab923de.tar.bz2 |
2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
* gnat_ugn.texi: Add description of '--help' and '--version'
options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
2013-04-24 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi: Minor syntax fix.
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
what and why is being analyzed. Remove the decoration of renamings as
this simply falls out of the general analysis mechanism.
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Explain_Redundancy): New routine.
(Resolve_Equality_Op): Place the error concerning a redundant
comparison to True at the "=". Try to explain the nature of the
redundant True.
2013-04-24 Javier Miranda <miranda@adacore.com>
* checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
check in interface thunks since it is performed at the caller
side.
(Expand_Simple_Function_Return): No accessibility check
needed in thunks since the check is done by the target routine.
2013-04-24 Vincent Celier <celier@adacore.com>
* xref_lib.adb (Add_Entity): Use the canonical file names
so that source file names with capital letters are found on
platforms where file names are case insensitive.
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
* par-ch4.adb (P_Name): Continue to parse the name extension when the
construct is attribute Loop_Entry. Do not convert the attribute
reference into an indexed component when there is at least one
expression / range following 'Loop_Entry.
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
(Process_PPCs): Generate procedure _Postconditions
only when the context has invariants or predicates or enabled
aspects/pragmas.
From-SVN: r198236
Diffstat (limited to 'gcc/ada/par-ch4.adb')
-rw-r--r-- | gcc/ada/par-ch4.adb | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index 8066b8c..f0cfa35 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -509,16 +509,25 @@ package body Ch4 is and then not Is_Parameterless_Attribute (Get_Attribute_Id (Attr_Name)) then - Set_Expressions (Name_Node, New_List); + -- Attribute Loop_Entry has no effect on the name extension + -- parsing logic, as if the attribute never existed in the + -- source. Continue parsing the subsequent expressions or + -- ranges. + + if Attr_Name = Name_Loop_Entry then + Scan; -- past left paren + goto Scan_Name_Extension_Left_Paren; -- Attribute Update contains an array or record association -- list which provides new values for various components or -- elements. The list is parsed as an aggregate. - if Attr_Name = Name_Update then + elsif Attr_Name = Name_Update then + Set_Expressions (Name_Node, New_List); Append (P_Aggregate, Expressions (Name_Node)); else + Set_Expressions (Name_Node, New_List); Scan; -- past left paren loop @@ -695,10 +704,20 @@ package body Ch4 is elsif not Comma_Present then T_Right_Paren; - Prefix_Node := Name_Node; - Name_Node := New_Node (N_Indexed_Component, Sloc (Prefix_Node)); - Set_Prefix (Name_Node, Prefix_Node); - Set_Expressions (Name_Node, Arg_List); + + -- Do not convert Prefix'Loop_Entry (Expr1, ..., ExprN) into an + -- indexed component now. Let the analysis determine whether the + -- attribute is legal and perform the transformation if needed. + + if Attr_Name = Name_Loop_Entry then + Set_Expressions (Name_Node, Arg_List); + else + Prefix_Node := Name_Node; + Name_Node := New_Node (N_Indexed_Component, Sloc (Prefix_Node)); + Set_Prefix (Name_Node, Prefix_Node); + Set_Expressions (Name_Node, Arg_List); + end if; + goto Scan_Name_Extension; end if; |