From e62b087fce09b8ce4bc33f2c7820130e4d72937b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 8 Nov 2017 15:15:54 +0100 Subject: Drop HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL For one, loplugin:unusedvariablecheck does not merely check for unused variables with types from the standard library since fe2164949b38a7f73883dbdcb3271b94e5c81744 "teach unusedvariablecheck plugin about SfxPoolItem subclasses", so disabling loplugin:unusedvariablecheck based on HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL is wrong. For another, I have seen no standard library implementation that decorates its types with such "warn-if-unused" attributes, and "[[nodiscard]] in the Library" (which proposes to add the corresponding C++17 attribute to just a few select functions and no types at all) makes it appear unlikely that will happen. Change-Id: I0a7759e1caf3e3137057c9689080948a4d6747e0 --- configure.ac | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8a8c6a5be5b4..fdd9c005fc1a 100644 --- a/configure.ac +++ b/configure.ac @@ -5904,21 +5904,6 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then ], [AC_MSG_RESULT([no])]) AC_LANG_POP([C++]) - AC_MSG_CHECKING([whether STL uses __attribute__((warn_unused))]) - AC_LANG_PUSH([C++]) - save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror -Wunused" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - void f() { std::string s; } - ])], [ - AC_MSG_RESULT([no]) - ], [ - AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL],[1]) - AC_MSG_RESULT([yes])]) - CXXFLAGS=$save_CXXFLAGS - AC_LANG_POP([C++]) - AC_MSG_CHECKING([whether $CXX supports __attribute__((warn_unused))]) AC_LANG_PUSH([C++]) save_CXXFLAGS=$CXXFLAGS -- cgit