diff --git a/build/Jamfile b/build/Jamfile index bd4748fc8..ab3b46e36 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -32,8 +32,6 @@ project $(c11-requires) BOOST_URL_SOURCE msvc-14.0:no - # Warnings in dependencies - gcc:"-Wno-maybe-uninitialized" gcc,windows:"-Wno-error=array-bounds" : common-requirements shared:BOOST_URL_DYN_LINK=1 diff --git a/include/boost/url/detail/config.hpp b/include/boost/url/detail/config.hpp index 17ecb91c4..828115f87 100644 --- a/include/boost/url/detail/config.hpp +++ b/include/boost/url/detail/config.hpp @@ -213,13 +213,6 @@ #define BOOST_URL_MAX_SIZE ((std::size_t)UINT32_MAX - 1) #endif -// noinline attribute -#ifdef BOOST_GCC -#define BOOST_URL_NO_INLINE [[gnu::noinline]] -#else -#define BOOST_URL_NO_INLINE -#endif - // libstdcxx copy-on-write strings #ifndef BOOST_URL_COW_STRINGS #if defined(BOOST_LIBSTDCXX_VERSION) && (BOOST_LIBSTDCXX_VERSION < 60000 || (defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI == 0)) diff --git a/include/boost/url/grammar/impl/tuple_rule.hpp b/include/boost/url/grammar/impl/tuple_rule.hpp index 6b7c1df44..a277d018b 100644 --- a/include/boost/url/grammar/impl/tuple_rule.hpp +++ b/include/boost/url/grammar/impl/tuple_rule.hpp @@ -160,6 +160,12 @@ struct parse_sequence } }; +// See error_types.hpp for details (#979) +#if defined(BOOST_GCC) && BOOST_GCC >= 70000 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + // returns a value_type template struct parse_sequence @@ -218,7 +224,7 @@ struct parse_sequence system::result rv = grammar::parse( it, end, get(rn)); - if( !rv ) + if( rv.has_error() ) { v = rv.error(); return; @@ -273,6 +279,10 @@ struct parse_sequence } }; +#if defined(BOOST_GCC) && BOOST_GCC >= 70000 +#pragma GCC diagnostic pop +#endif + } // detail template< diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 601554d9d..f782bd036 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,7 +18,7 @@ endif() if (BOOST_URL_WARNINGS_AS_ERRORS) if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7) - set(BOOST_URL_TEST_FLAGS "-Wall -Werror -Wno-unused-but-set-variable -Wno-maybe-uninitialized") + set(BOOST_URL_TEST_FLAGS "-Wall -Werror -Wno-unused-but-set-variable") else() set(BOOST_URL_TEST_FLAGS "-Wall -Werror -Wno-unused-but-set-variable") endif() diff --git a/test/Jamfile b/test/Jamfile index 3cac8f576..5c0e651c5 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -20,7 +20,6 @@ project # Warnings in dependencies gcc:"-Wno-unused-but-set-variable" - gcc:"-Wno-maybe-uninitialized" gcc-15:"-Wno-deprecated-declarations" gcc,windows:"-Wno-error=array-bounds" clang:"-Wno-unused-but-set-variable"