public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6443] [Ada] Escalate pre-continuation messages from warnings to errors
@ 2022-01-11 13:26 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-01-11 13:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:45742b619285f53db63153ad094d12dc98504e4b

commit r12-6443-g45742b619285f53db63153ad094d12dc98504e4b
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Wed Dec 8 22:58:22 2021 +0100

    [Ada] Escalate pre-continuation messages from warnings to errors
    
    gcc/ada/
    
            * errout.adb (Error_Msg_Internal): Propagate warnings-as-error
            flag from continuation message to its preceding messages.

Diff:
---
 gcc/ada/errout.adb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index 00230a25fd7..0778f54944d 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -1240,10 +1240,13 @@ package body Errout is
                       or else
                     Warning_Treated_As_Error (Get_Warning_Tag (Cur_Msg)));
 
-      --  Propagate Warn_Err to this message and preceding continuations
+      --  Propagate Warn_Err to this message and preceding continuations.
+      --  Likewise, propagate Is_Warning_Msg, because the current continued
+      --  message could have been escalated from warning to error.
 
       for J in reverse 1 .. Errors.Last loop
          Errors.Table (J).Warn_Err := Warn_Err;
+         Errors.Table (J).Warn     := Is_Warning_Msg;
          exit when not Errors.Table (J).Msg_Cont;
       end loop;


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

only message in thread, other threads:[~2022-01-11 13:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 13:26 [gcc r12-6443] [Ada] Escalate pre-continuation messages from warnings to errors 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).