* [PATCH RFA] build: add -Wconditionally-supported to strict_warn [PR64867]
@ 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
0 siblings, 2 replies; 4+ messages in thread
From: Jason Merrill @ 2022-12-06 13:26 UTC (permalink / raw)
To: gcc-patches
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.
---
gcc/configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7ca08726efa..12771fc292c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -580,7 +580,7 @@ ACX_PROG_CC_WARNING_OPTS(
m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes ],
[])), [c_loose_warn])
ACX_PROG_CXX_WARNING_OPTS(
- m4_quote(m4_do([-Wmissing-format-attribute ],
+ m4_quote(m4_do([-Wmissing-format-attribute ], [-Wconditionally-supported ],
[-Woverloaded-virtual])), [strict_warn])
ACX_PROG_CC_WARNING_OPTS(
m4_quote(m4_do([-Wold-style-definition -Wc++-compat])), [c_strict_warn])
base-commit: d19aa6af6634b1e97f38431ad091f3b3f12baf2f
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH PING] build: add -Wconditionally-supported to strict_warn [PR64867]
2022-12-06 13:26 [PATCH RFA] build: add -Wconditionally-supported to strict_warn [PR64867] Jason Merrill
@ 2022-12-13 4:28 ` Jason Merrill
2022-12-17 0:52 ` [PATCH RFA] " Jeff Law
1 sibling, 0 replies; 4+ messages in thread
From: Jason Merrill @ 2022-12-13 4:28 UTC (permalink / raw)
To: gcc-patches
On 12/6/22 08:26, Jason Merrill wrote:
> Tested x86_64-pc-linux-gnu, OK for trunk?
Ping.
> -- 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.
> ---
> gcc/configure.ac | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 7ca08726efa..12771fc292c 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -580,7 +580,7 @@ ACX_PROG_CC_WARNING_OPTS(
> m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes ],
> [])), [c_loose_warn])
> ACX_PROG_CXX_WARNING_OPTS(
> - m4_quote(m4_do([-Wmissing-format-attribute ],
> + m4_quote(m4_do([-Wmissing-format-attribute ], [-Wconditionally-supported ],
> [-Woverloaded-virtual])), [strict_warn])
> ACX_PROG_CC_WARNING_OPTS(
> m4_quote(m4_do([-Wold-style-definition -Wc++-compat])), [c_strict_warn])
>
> base-commit: d19aa6af6634b1e97f38431ad091f3b3f12baf2f
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RFA] build: add -Wconditionally-supported to strict_warn [PR64867]
2022-12-06 13:26 [PATCH RFA] build: add -Wconditionally-supported to strict_warn [PR64867] Jason Merrill
2022-12-13 4:28 ` [PATCH PING] " Jason Merrill
@ 2022-12-17 0:52 ` Jeff Law
2022-12-19 20:46 ` Jason Merrill
1 sibling, 1 reply; 4+ messages in thread
From: Jeff Law @ 2022-12-17 0:52 UTC (permalink / raw)
To: Jason Merrill, gcc-patches
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.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RFA] build: add -Wconditionally-supported to strict_warn [PR64867]
2022-12-17 0:52 ` [PATCH RFA] " Jeff Law
@ 2022-12-19 20:46 ` Jason Merrill
0 siblings, 0 replies; 4+ messages in thread
From: Jason Merrill @ 2022-12-19 20:46 UTC (permalink / raw)
To: Jeff Law, gcc-patches
[-- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-19 20:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06 13:26 [PATCH RFA] build: add -Wconditionally-supported to strict_warn [PR64867] 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 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).