From 63d3e3348dcd2178196634ede35b23ffe3a2c50a Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" Date: Wed, 15 Oct 2014 11:53:06 +0200 Subject: [PATCH] don't set -Wmissing-noreturn on Windows because libtool --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 01df09d..cabd87b 100644 --- a/configure.ac +++ b/configure.ac @@ -254,7 +254,13 @@ test_gcc_flag() { # If using GCC specify some additional parameters if test "x$GCC" = "xyes" ; then - DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -fdiagnostics-show-option -Wno-cast-qual -fno-strict-aliasing" + DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -fdiagnostics-show-option -Wno-cast-qual -fno-strict-aliasing" + + # when compiling for MingW, -Wmissing-noreturn is triggered a bunch of + # times from autogenerated libtool wrappers, so leave it out on Windows. + if test "x$ac_cv_have_decl__WIN32" != "xyes" ; then + DESIRED_FLAGS="$DESIRED_FLAGS -Wmissing-noreturn" + fi for flag in $DESIRED_FLAGS ; do AC_MSG_CHECKING([whether $CC accepts $flag]) -- 2.39.2