[RFA] build: add -Wconditionally-supported to strict_warn [PR64867]

Message ID 20221206132624.1051104-1-jason@redhat.com
State Committed
Commit 263c22a95bc9a0d80c4873c0291b0f938cea7310
Headers
Series [RFA] build: add -Wconditionally-supported to strict_warn [PR64867] |

Commit Message

Jason Merrill Dec. 6, 2022, 1:26 p.m. UTC
  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(-)


base-commit: d19aa6af6634b1e97f38431ad091f3b3f12baf2f
  

Comments

Jason Merrill Dec. 13, 2022, 4:28 a.m. UTC | #1
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
  
Jeff Law Dec. 17, 2022, 12:52 a.m. UTC | #2
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
  
Jason Merrill Dec. 19, 2022, 8:46 p.m. UTC | #3
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:
  

Patch

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])