diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-12-08 22:58:22 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-11 13:24:45 +0000 |
commit | 45742b619285f53db63153ad094d12dc98504e4b (patch) | |
tree | fcfcd8ac8ca7f73523a1d9d4d412de56728670f5 | |
parent | bc0b26b9a5836dc99fe69029b6948b8a2a58a36f (diff) | |
download | gcc-45742b619285f53db63153ad094d12dc98504e4b.zip gcc-45742b619285f53db63153ad094d12dc98504e4b.tar.gz gcc-45742b619285f53db63153ad094d12dc98504e4b.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/errout.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index 00230a2..0778f54 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; |