> Le 15 janv. 2019 à 20:36, Akim Demaille <[email protected]> a écrit : > >> Le 15 janv. 2019 à 19:44, Derek Clegg <[email protected]> a écrit : >> >> It looks okay, however, based on a brief inspection. One thing: >> >>> if test "$enable_gcc_warnings" = yes; then >>> warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align >>> -fparse-all-comments -Wdocumentation >>> - -Wformat -Wnull-dereference -Wpointer-arith -Wshadow -Wwrite-strings' >>> + -Wformat -Wnull-dereference -Wpointer-arith -Wshadow >>> + -Wundefined-func-template -Wwrite-strings' >>> warn_c='-Wbad-function-cast -Wstrict-prototypes' >>> warn_cxx='-Wextra-semi -Wnoexcept' >>> # Warnings for the test suite only. >> >> I would expect “-Wundefined-func-template” to appear in “warn_cxx”, not >> “warn_common”. But I may not fully understand what’s going on here. > > Of course you are right. configure.ac correctly sees that it does not make > sense for the C compiler, but it should go in warn_cxx. Thanks!
commit a634aad9e639db7ea204473f2edafc294fb49ca2 Author: Akim Demaille <[email protected]> Date: Tue Jan 15 20:42:18 2019 +0100 configure: don't try to run C++ warnings on C Reported by Derek Clegg. https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00066.html * configure.ac: here. diff --git a/configure.ac b/configure.ac index 23aeb86d..a3a471af 100644 --- a/configure.ac +++ b/configure.ac @@ -98,9 +98,9 @@ if test "$enable_gcc_warnings" = yes; then -fparse-all-comments -Wdocumentation -Wformat -Wimplicit-fallthrough -Wnull-dereference -Wpointer-arith -Wshadow - -Wundefined-func-template -Wwrite-strings' + -Wwrite-strings' warn_c='-Wbad-function-cast -Wstrict-prototypes' - warn_cxx='-Wextra-semi -Wnoexcept' + warn_cxx='-Wextra-semi -Wnoexcept -Wundefined-func-template' # Warnings for the test suite only. # # -fno-color-diagnostics: Clang's use of colors in the error
