From b953f511687e03a50fa231119fa55ff9c8c0f279 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 20 Nov 2014 15:41:49 +0100 Subject: [PATCH] [multiple changes] 2014-11-20 Robert Dewar * errout.adb (Error_Msg): Don't suppress continuation msgs for run-time files. * sem_prag.adb (Analyze_Pragma, case Elaborate): Forbid pragma Elaborate in SPARK mode. 2014-11-20 Yannick Moy * gnat_rm.texi: Update GNAT RM with rule about expressions in Update attribute. From-SVN: r217862 --- gcc/ada/ChangeLog | 12 ++++++++++++ gcc/ada/errout.adb | 10 ++++++---- gcc/ada/gnat_rm.texi | 14 ++++++++------ gcc/ada/sem_prag.adb | 2 ++ 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5c3df6f8e46..0ccf7eae1fd 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,15 @@ +2014-11-20 Robert Dewar + + * errout.adb (Error_Msg): Don't suppress continuation msgs for + run-time files. + * sem_prag.adb (Analyze_Pragma, case Elaborate): Forbid pragma + Elaborate in SPARK mode. + +2014-11-20 Yannick Moy + + * gnat_rm.texi: Update GNAT RM with rule about expressions in + Update attribute. + 2014-11-20 Thomas Quinot * g-socket.adb (To_Host_Entry): Guard against case of a diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index 911820c0363..803e2d4c939 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -308,11 +308,13 @@ package body Errout is end if; -- If we already have messages, and we are trying to place a message at - -- No_Location or in package Standard, then just ignore the attempt - -- since we assume that what is happening is some cascaded junk. Note - -- that this is safe in the sense that proceeding will surely bomb. + -- No_Location, then just ignore the attempt since we assume that what + -- is happening is some cascaded junk. Note that this is safe in the + -- sense that proceeding will surely bomb. We will also bomb if the flag + -- location is No_Location and we don't have any messages so far, but + -- that is a real bug and a legitimate bomb, so we go ahead. - if Flag_Location < First_Source_Ptr + if Flag_Location = No_Location and then Total_Errors_Detected > 0 then return; diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 923957edf4e..3824ee877fc 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -10146,12 +10146,14 @@ INDEX_EXPRESSION_LIST ::= ( EXPRESSION @{, EXPRESSION @} @end smallexample @noindent -where @code{PREFIX} is the name of an array or record object, and -the association list in parentheses does not contain an @code{others} -choice. The effect is to yield a copy of the array or record value which -is unchanged apart from the components mentioned in the association list, which -are changed to the indicated value. The original value of the array or -record value is not affected. For example: +where @code{PREFIX} is the name of an array or record object, the +association list in parentheses does not contain an @code{others} +choice and the box symbol @code{<>} may not appear in any +expression. The effect is to yield a copy of the array or record value +which is unchanged apart from the components mentioned in the +association list, which are changed to the indicated value. The +original value of the array or record value is not affected. For +example: @smallexample @c ada type Arr is Array (1 .. 5) of Integer; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index d155b06bc59..94bbf9397e6 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -13125,6 +13125,8 @@ package body Sem_Prag is Citem : Node_Id; begin + SPARK_Msg_N ("pragma Elaborate not allowed", N); + -- Pragma must be in context items list of a compilation unit if not Is_In_Context_Clause then -- 2.30.2