public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/fix-Wformat-diag-with-rtl-checking)] Fix Werror=format-diag with --disable-nls. Date: Thu, 20 Jan 2022 08:33:19 +0000 (GMT) [thread overview] Message-ID: <20220120083319.56687385780E@sourceware.org> (raw) https://gcc.gnu.org/g:9d3892cbfcccd1355c3fad5c144db3f4ca28eb4a commit 9d3892cbfcccd1355c3fad5c144db3f4ca28eb4a Author: Martin Liska <mliska@suse.cz> Date: Thu Jan 20 09:30:01 2022 +0100 Fix Werror=format-diag with --disable-nls. PR c++/104134 gcc/cp/ChangeLog: * error.cc (dump_aggr_type): Partially disable the warning. 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:
reply other threads:[~2022-01-20 8:33 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220120083319.56687385780E@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).