]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
build: add -Wconditionally-supported to strict_warn [PR64867]
authorJason Merrill <jason@redhat.com>
Mon, 5 Dec 2022 15:00:31 +0000 (10:00 -0500)
committerJason Merrill <jason@redhat.com>
Mon, 19 Dec 2022 15:56:33 +0000 (10:56 -0500)
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
gcc/configure.ac

index 61b3cedbe693ea02692590aa39bbd5bfe3e0fe91..921aad607127969da752d95c908feba79dea822b 100755 (executable)
@@ -7215,7 +7215,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 strict_warn=
 save_CXXFLAGS="$CXXFLAGS"
-for real_option in -Wmissing-format-attribute -Woverloaded-virtual; do
+for real_option in -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual; do
   # Do the check with the no- prefix removed since gcc silently
   # accepts any -Wno-* option on purpose
   case $real_option in
index 5efbf11793cf224b40d42132741e5bfa0754389e..b91f54ce05bcd363416c34c3a901c94148b68b1b 100644 (file)
@@ -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])