From 15c38db1d2844527aa7436ec43079d624f2f595d Mon Sep 17 00:00:00 2001 From: Mathias Gaunard Date: Mon, 29 Sep 2014 14:55:39 +0200 Subject: [PATCH] enable __attribute__((unused)) to avoid unused typedef warnings with all gcc-like variants starting with gcc 4.0. Avoids generating the warning with Clang among others. --- include/boost/static_assert.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/static_assert.hpp b/include/boost/static_assert.hpp index 2d3ab04..8dfddae 100644 --- a/include/boost/static_assert.hpp +++ b/include/boost/static_assert.hpp @@ -67,7 +67,7 @@ // // If the compiler warns about unused typedefs then enable this: // -#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) +#if defined(__GNUC__) && (__GNUC__ >= 4) # define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused)) #else # define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE