From: Jason Merrill <jason@redhat.com>
To: Jeff Law <jeffreyalaw@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH RFA] build: add -Wconditionally-supported to strict_warn [PR64867]
Date: Mon, 19 Dec 2022 15:46:22 -0500 [thread overview]
Message-ID: <7a327e04-b789-5aef-ee12-15c39454716b@redhat.com> (raw)
In-Reply-To: <b2d2135f-33c8-dfb1-7078-9b7caacbde8c@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
On 12/16/22 19:52, Jeff Law wrote:
>
>
> On 12/6/22 06:26, Jason Merrill via Gcc-patches wrote:
>> Tested x86_64-pc-linux-gnu, OK for trunk?
>>
>> -- 8< --
>>
>> The PR (which isn't resolved by this commit) pointed out to me that GCC
>> should build with -Wconditionally-supported to support bootstrapping
>> with a
>> C++11 compiler that makes different choices.
>>
>> PR c++/64867
>>
>> gcc/ChangeLog:
>>
>> * configure.ac (strict_warn): Add -Wconditionally-supported.
>> * configure: Regenerate.
> OK. I wonder if it'll trip anything, particularly in the target files.
Also applying this to fix a breakage reported on IRC:
[-- Attachment #2: 0001-build-avoid-Wconditionally-supported-on-qsort-check.patch --]
[-- Type: text/x-patch, Size: 1212 bytes --]
From eef0873b6906d5404a04b817377c33f585cf3f21 Mon Sep 17 00:00:00 2001
From: Jason Merrill <jason@redhat.com>
Date: Mon, 19 Dec 2022 15:41:36 -0500
Subject: [PATCH] build: avoid -Wconditionally-supported on qsort check
To: gcc-patches@gcc.gnu.org
It's OK to rely on conditionally-supported features in #if CHECKING_P, since
that isn't defined in stage 1.
gcc/ChangeLog:
* sort.cc: Disable -Wconditionally-supported in
CHECKING_P code.
---
gcc/sort.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/sort.cc b/gcc/sort.cc
index 87f826818bb..eeddfcf1fef 100644
--- a/gcc/sort.cc
+++ b/gcc/sort.cc
@@ -237,6 +237,10 @@ do { \
}
#if CHECKING_P
+ /* Don't complain about cast from void* to function pointer. */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconditionally-supported"
+
/* Adapter for using two-argument comparators in functions expecting the
three-argument sort_r_cmp_fn type. */
static int
@@ -266,6 +270,7 @@ gcc_qsort (void *vbase, size_t n, size_t size, cmp_fn *cmp)
free (buf);
#if CHECKING_P
qsort_chk (vbase, n, size, cmp2to3, (void*)cmp);
+#pragma GCC diagnostic pop
#endif
}
--
2.31.1
prev parent reply other threads:[~2022-12-19 20:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 13:26 Jason Merrill
2022-12-13 4:28 ` [PATCH PING] " Jason Merrill
2022-12-17 0:52 ` [PATCH RFA] " Jeff Law
2022-12-19 20:46 ` Jason Merrill [this message]
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=7a327e04-b789-5aef-ee12-15c39454716b@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
/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: link
Be 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).