aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/errout.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-29 14:44:34 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-29 14:44:34 +0200
commit414c65636fdd1503b2134da24a49bb8a3ab57ee3 (patch)
tree5b63d111086fa3f1a33066a40b49275d1befa3a0 /gcc/ada/errout.adb
parent0382062b3b87859411e98bb2d3347020e7f45f48 (diff)
downloadgcc-414c65636fdd1503b2134da24a49bb8a3ab57ee3.zip
gcc-414c65636fdd1503b2134da24a49bb8a3ab57ee3.tar.gz
gcc-414c65636fdd1503b2134da24a49bb8a3ab57ee3.tar.bz2
[multiple changes]
2014-07-29 Thomas Quinot <quinot@adacore.com> * errout.adb (Set_Error_Posted): When propagating flag to an enclosing named association, also propagate to the parent of that node, so that named and positional associations are treated consistently. 2014-07-29 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Resolve_Attribute, case 'Update): Set Do_Range_Check properly on array component expressions that have a scalar type. In GNATprove mode, only checks on scalar components must be marked by the front-end. 2014-07-29 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Type_Conversion): If the type of the expression is a limited view, use the non-limited view when available. 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated case statement as coming from a conditional expression. (Expand_N_If_Expression): Mark the generated if statement as coming from a conditional expression. * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled objects found in case statement alternatives when the case statement is actually a case expression. (Expand_N_If_Statement): Do not process controlled objects found in an if statement when the if statement is actually an if expression. * sinfo.adb (From_Conditional_Expression): New routine. (Set_From_Conditional_Expression): New routine. * sinfo.ads Add new semantic flag From_Conditional_Expression and update related nodes. (From_Conditional_Expression): New routine along with pragma Inline. (Set_From_Conditional_Expression): New routine along with pragma Inline. From-SVN: r213156
Diffstat (limited to 'gcc/ada/errout.adb')
-rw-r--r--gcc/ada/errout.adb21
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index a2e9b45..a18627c 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -156,11 +156,12 @@ package body Errout is
-- variables Msg_Buffer are set on return Msglen.
procedure Set_Posted (N : Node_Id);
- -- Sets the Error_Posted flag on the given node, and all its parents
- -- that are subexpressions and then on the parent non-subexpression
- -- construct that contains the original expression (this reduces the
- -- number of cascaded messages). Note that this call only has an effect
- -- for a serious error. For a non-serious error, it has no effect.
+ -- Sets the Error_Posted flag on the given node, and all its parents that
+ -- are subexpressions and then on the parent non-subexpression construct
+ -- that contains the original expression. If that parent is a named
+ -- association, the flag is further propagated to its parent. This is done
+ -- in order to guard against cascaded errors. Note that this call has an
+ -- effect for a serious error only.
procedure Set_Qualification (N : Nat; E : Entity_Id);
-- Outputs up to N levels of qualification for the given entity. For
@@ -3007,6 +3008,16 @@ package body Errout is
exit when Nkind (P) not in N_Subexpr;
end loop;
+ if Nkind_In (P,
+ N_Pragma_Argument_Association,
+ N_Component_Association,
+ N_Discriminant_Association,
+ N_Generic_Association,
+ N_Parameter_Association)
+ then
+ Set_Error_Posted (Parent (P));
+ end if;
+
-- A special check, if we just posted an error on an attribute
-- definition clause, then also set the entity involved as posted.
-- For example, this stops complaining about the alignment after