[gcc(refs/users/marxin/heads/fix-Wformat-diag-with-rtl-checking)] Test me.
Martin Liska
marxin@gcc.gnu.org
Thu Jan 20 08:30:23 GMT 2022
https://gcc.gnu.org/g:86f55cfef1c5338e7ebac27c59aad0d8505f6378
commit 86f55cfef1c5338e7ebac27c59aad0d8505f6378
Author: Martin Liska <mliska@suse.cz>
Date: Thu Jan 20 09:30:01 2022 +0100
Test me.
Diff:
---
gcc/cp/error.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc
index 1ab0c25a477..c031c75cc5e 100644
--- a/gcc/cp/error.cc
+++ b/gcc/cp/error.cc
@@ -768,6 +768,11 @@ class_key_or_enum_as_string (tree t)
return "struct";
}
+#if __GNUC__ >= 10
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-diag"
+#endif
+
/* Print out a class declaration T under the control of FLAGS,
in the form `class foo'. */
@@ -851,6 +856,10 @@ dump_aggr_type (cxx_pretty_printer *pp, tree t, int flags)
flags & ~TFF_TEMPLATE_HEADER);
}
+#if __GNUC__ >= 10
+#pragma GCC diagnostic pop
+#endif
+
/* Dump into the obstack the initial part of the output for a given type.
This is necessary when dealing with things like functions returning
functions. Examples:
More information about the Gcc-cvs
mailing list