Handle gcc quirk with parameter checking

At least some versions of GCC appear to take any -Wno-foo option
without error even if that option is not supported.  But they will
error out if -Wno-error=foo is used.  This sounds like a GCC bug, but
we'll work around it and test for the feature both ways.

Thanks-to: Matteo Brancaleoni <mbrancaleoni@voismart.it>

FS-6850 #resolve
This commit is contained in:
Travis Cross 2014-09-25 13:18:02 +00:00
parent 051772e4ae
commit 13d9e99ae7
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ if test "$ax_cv_c_compiler_vendor" = "gnu"; then
saved_CFLAGS="$CFLAGS"
AC_CACHE_CHECK([whether compiler supports -Wno-unused-result],
[ac_cv_gcc_supports_w_no_unused_result], [
CFLAGS="$CFLAGS -Wno-unused-result"
CFLAGS="$CFLAGS -Wno-unused-result -Wno-error=unused-result"
AC_TRY_COMPILE([],[return 0;],
[ac_cv_gcc_supports_w_no_unused_result=yes],
[ac_cv_gcc_supports_w_no_unused_result=no])])