public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2605] ada: Allow warnings with explain code
@ 2023-07-18 13:13 Marc Poulhi?s
0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2023-07-18 13:13 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:7e7c40617a6f210b5a4c7cf63970a92bd0b9ec6a
commit r14-2605-g7e7c40617a6f210b5a4c7cf63970a92bd0b9ec6a
Author: Yannick Moy <moy@adacore.com>
Date: Fri Jun 30 14:51:53 2023 +0200
ada: Allow warnings with explain code
Change the way explain codes are handled to generate the command for the
user to get the explanations, as this was not working for warnings.
gcc/ada/
* errout.adb (Error_Msg_Internal): Remove call to
Prescan_Message on the special continuation for the explain code
command, as this does not play well with the setting of global
variables for the message (like its status as a warning or not).
Instead, set directly the global variables regarding content of
the message in terms of special characters.
Diff:
---
gcc/ada/errout.adb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index adc260843ec..ac6491cf299 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -1451,10 +1451,12 @@ package body Errout is
if Has_Error_Code then
declare
Msg : constant String :=
- "launch ""gnatprove --explain=[]"" for more information";
+ "\launch ""gnatprove --explain=[]"" for more information";
begin
- Prescan_Message (Msg);
+ Has_Double_Exclam := False;
Has_Error_Code := False;
+ Has_Insertion_Line := False;
+
Error_Msg_Internal
(Msg => Msg,
Span => Span,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-18 13:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-18 13:13 [gcc r14-2605] ada: Allow warnings with explain code Marc Poulhi?s
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).