On 1/18/22 17:28, Martin Liška wrote:
On 1/16/22 01:31, Martin Sebor wrote:

Hello.

(I think your message in unrelated to this email thread).

Martin, I've looked into removing the -Wno-error for this warning
for just a subset of targets.  It seems doable with some hardcoding
in configure.ac but if you're planning to do the cleanup for all of
them I'm wondering if we should even bother.  What do you think?

Yes, I've just installed patches that should address all -Wformat-diag errors
for all targets we have.

Please enable the corresponding -Werror for bootstrap.

I've got a patch that enables that. Right now, there should not be any 
-Wformat-diag
in any target. Thus I'm going to install the following patch.

Martin


Thanks,
Martin


Martin

From 54c453980fb2b04f6605dc8d50e3472e37a3e629 Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Wed, 19 Jan 2022 11:54:59 +0100
Subject: [PATCH] Enable -Werror=format-diag during bootstrap.

gcc/ChangeLog:

	* configure.ac: Remove -Wno-error=format-diag.
	* configure: Regenerate.
---
 gcc/configure    | 4 ++--
 gcc/configure.ac | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/configure b/gcc/configure
index fd7227078e4..3b228c3d9dc 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -7089,7 +7089,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 loose_warn=
 save_CXXFLAGS="$CXXFLAGS"
-for real_option in -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag $wf_opt; do
+for real_option in -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual $wf_opt; do
   # Do the check with the no- prefix removed since gcc silently
   # accepts any -Wno-* option on purpose
   case $real_option in
@@ -7147,7 +7147,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 c_loose_warn=
 save_CFLAGS="$CFLAGS"
-for real_option in -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag; do
+for real_option in -Wstrict-prototypes -Wmissing-prototypes ; do
   # Do the check with the no- prefix removed since gcc silently
   # accepts any -Wno-* option on purpose
   case $real_option in
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 40cfd38fe56..472d1c8c341 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -573,11 +573,11 @@ AS_IF([test $enable_build_format_warnings = no],
       [wf_opt=-Wno-format],[wf_opt=])
 ACX_PROG_CXX_WARNING_OPTS(
 	m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
-		       [-Wcast-qual -Wno-error=format-diag $wf_opt])),
+		       [-Wcast-qual $wf_opt])),
 		       [loose_warn])
 ACX_PROG_CC_WARNING_OPTS(
 	m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes ],
-	 	       [-Wno-error=format-diag])), [c_loose_warn])
+		       [])), [c_loose_warn])
 ACX_PROG_CXX_WARNING_OPTS(
 	m4_quote(m4_do([-Wmissing-format-attribute ],
 		       [-Woverloaded-virtual])), [strict_warn])
-- 
2.34.1

Reply via email to