public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-852] [Ada] Fix spurious options being inserted in -fdiagnostics-format=json output
@ 2022-05-30 8:32 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-30 8:32 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1b88c61e3749d8da905af1c8efc11002b01bd339
commit r13-852-g1b88c61e3749d8da905af1c8efc11002b01bd339
Author: Ghjuvan Lacambre <lacambre@adacore.com>
Date: Fri Apr 29 16:53:05 2022 +0200
[Ada] Fix spurious options being inserted in -fdiagnostics-format=json output
Without this patch, gnat would use `-gnatw?` as the default option for
some of the default warnings.
gcc/ada/
* erroutc.adb (Get_Warning_Option): Don't consider `?` as a
valid option switch.
Diff:
---
gcc/ada/erroutc.adb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb
index b4f50649602..cab7fecef5e 100644
--- a/gcc/ada/erroutc.adb
+++ b/gcc/ada/erroutc.adb
@@ -367,7 +367,7 @@ package body Erroutc is
Warn : constant Boolean := Errors.Table (Id).Warn;
Warn_Chr : constant String (1 .. 2) := Errors.Table (Id).Warn_Chr;
begin
- if Warn and then Warn_Chr /= " " then
+ if Warn and then Warn_Chr /= " " and then Warn_Chr (1) /= '?' then
if Warn_Chr = "$ " then
return "-gnatel";
elsif Warn_Chr (2) = ' ' then
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-30 8:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 8:32 [gcc r13-852] [Ada] Fix spurious options being inserted in -fdiagnostics-format=json output 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).