On 5/13/21 11:33 PM, Vadim Zeitlin wrote:
  Hello,

  While running my script[1] parsing gcc/c-family/c.opt to extract
information about the new warnings for C++ programs, I've noticed that a
couple of new warnings in gcc 11 don't use the "Warning" flag which, I had
assumed, would be used for all warnings (with a couple of historical
exceptions). Was this assumption wrong, or could this have been an
oversight, i.e. should this flag be added to these warning too?

  For the reference, the commits adding the warning were:

- 1d87302a8e2 (c++: Add -Wexceptions warning option [PR97675], 2020-11-03)
- 10ee6da64c5 (C++ Module options, 2020-12-01)

  Thanks in advance,
VZ


You are right, thanks for heads up. I'm going to install the following obvious 
patch
(and will add it to gcc-11 branch as well).

Martin
>From 3d4ba1b4f34d16b98d6333d203c80b50f655d445 Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Fri, 14 May 2021 11:40:58 +0200
Subject: [PATCH] opts: add Warning keyword for 2 options

gcc/c-family/ChangeLog:

	* c.opt: Add Warning keyword for 2 options.
---
 gcc/c-family/c.opt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index f1b4c3f34ec..5fcf961fd96 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -592,7 +592,7 @@ C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration)
 This switch is deprecated; use -Werror=implicit-function-declaration instead.
 
 Wexceptions
-C++ ObjC++ Var(warn_exceptions) Init(1)
+C++ ObjC++ Var(warn_exceptions) Init(1) Warning
 Warn when an exception handler is shadowed by another handler.
 
 Wextra
@@ -1741,7 +1741,7 @@ C++ ObjC Var(flag_module_version_ignore) Integer
 ; undocumented, Very dangerous, but occasionally useful
 
 Winvalid-imported-macros
-C++ ObjC++ Var(warn_imported_macros)
+C++ ObjC++ Var(warn_imported_macros) Warning
 Warn about macros that have conflicting header units definitions.
 
 flang-info-include-translate
-- 
2.31.1

Reply via email to