public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-190] [Ada] Set Error_Msg_Warn before use of << insertion
@ 2022-05-09  9:31 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-09  9:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:706940c2c867bc2609338f27eaea056aedc13d63

commit r13-190-g706940c2c867bc2609338f27eaea056aedc13d63
Author: Yannick Moy <moy@adacore.com>
Date:   Thu Jan 13 17:35:24 2022 +0100

    [Ada] Set Error_Msg_Warn before use of << insertion
    
    Calls to Error_Msg procedures with a message using the < or <<
    insertions need to set appropriately Error_Msg_Warn. This was not done
    in one call, which would lead to spurious errors when changing the
    implementation of a runtime unit. This fixes it so that changes can be
    applied.
    
    gcc/ada/
    
            * exp_ch4.adb (Expand_Allocator_Expression): Set Error_Msg_Warn
            correctly.

Diff:
---
 gcc/ada/exp_ch4.adb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 09e734defb2..9de384a4eb9 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -835,6 +835,7 @@ package body Exp_Ch4 is
               Make_Raise_Program_Error (Loc,
                 Reason => PE_Accessibility_Check_Failed));
 
+            Error_Msg_Warn := SPARK_Mode /= On;
             Error_Msg_N ("anonymous access discriminant is too deep for use"
                          & " in allocator<<", N);
             Error_Msg_N ("\Program_Error [<<", N);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-09  9:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  9:31 [gcc r13-190] [Ada] Set Error_Msg_Warn before use of << insertion Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).