summaryrefslogtreecommitdiffstats
path: root/llvm/autoconf
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-02-13 21:19:39 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-02-13 21:19:39 +0000
commitb5e23ef425eafa5483e2fbbda8b8d6e645db0f40 (patch)
treeffe9f050cef140297523a0f914d7c16fac6802ae /llvm/autoconf
parent6d9f13127cba3eb7074a027c63160c8a2eca0e65 (diff)
downloadbcm5719-llvm-b5e23ef425eafa5483e2fbbda8b8d6e645db0f40.tar.gz
bcm5719-llvm-b5e23ef425eafa5483e2fbbda8b8d6e645db0f40.zip
configure: remove workaround for gcc's -Wno-maybe-uninitialized
Since r174770 gcc version check is not needed because CXX_FLAG_CHECK implements the workaround itself. llvm-svn: 175080
Diffstat (limited to 'llvm/autoconf')
-rw-r--r--llvm/autoconf/configure.ac28
1 files changed, 5 insertions, 23 deletions
diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac
index ae615df2029..b8f17662285 100644
--- a/llvm/autoconf/configure.ac
+++ b/llvm/autoconf/configure.ac
@@ -1272,39 +1272,21 @@ CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros])
CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers])
CXX_FLAG_CHECK(NO_NESTED_ANON_TYPES, [-Wno-nested-anon-types])
CXX_FLAG_CHECK(COVERED_SWITCH_DEFAULT, [-Wcovered-switch-default])
+
dnl GCC's potential uninitialized use analysis is weak and presents lots of
dnl false positives, so disable it.
+NO_UNINITIALIZED=
+NO_MAYBE_UNINITIALIZED=
if test "$GXX" = "yes"
then
CXX_FLAG_CHECK(NO_MAYBE_UNINITIALIZED, [-Wno-maybe-uninitialized])
dnl gcc 4.7 introduced -Wmaybe-uninitialized to distinguish cases which are
- dnl known to be uninitialized from cases which might be uninitialized. We
+ dnl known to be uninitialized from cases which might be uninitialized. We
dnl still want to catch the first kind of errors.
- if test "$NO_MAYBE_UNINITIALIZED" != "-Wno-maybe-uninitialized"
+ if test -z "$NO_MAYBE_UNINITIALIZED"
then
CXX_FLAG_CHECK(NO_UNINITIALIZED, [-Wno-uninitialized])
- else
- dnl Some versions of gcc accept unsupported -W flags if there is
- dnl no warning but stop with an error when a warning is
- dnl encountered. If this gcc is earlier than 4.7, just use
- dnl -Wno-uninitialized.
- gxx_version=`$CXX -dumpversion`
- gxx_version_major=`echo $gxx_version | cut -d'.' -f1`
- gxx_version_minor=`echo $gxx_version | cut -d'.' -f2`
- gxx_version_patch=`echo $gxx_version | cut -d'.' -f3`
-
- if test "$gxx_version_major" -ge "4" \
- && test "$gxx_version_minor" -ge "7"; then
- dnl AC_SUBST doesn't work with empty strings.
- NO_UNINITIALIZED=
- else
- NO_MAYBE_UNINITIALIZED=
- CXX_FLAG_CHECK(NO_UNINITIALIZED, [-Wno-uninitialized])
- fi
fi
-else
- NO_UNINITIALIZED=
- NO_MAYBE_UNINITIALIZED=
fi
AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $NO_NESTED_ANON_TYPES $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED])
OpenPOWER on IntegriCloud