From a7d0da59adf111ccb5585c77e6eff21d0050b50d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 8 May 2020 23:23:50 +0300 Subject: [PATCH 1/6] Add clang-10 to Travis --- .travis.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0c13b62..98a6bb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -223,6 +223,19 @@ matrix: - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' + - os: linux + dist: xenial + compiler: clang++-10 + env: TOOLSET=clang COMPILER=clang++-10 CXXSTD=11,14,17,2a + addons: + apt: + packages: + - clang-10 + sources: + - ubuntu-toolchain-r-test + - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main' + key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' + - os: linux compiler: clang++-8 env: UBSAN=1 TOOLSET=clang COMPILER=clang++-8 CXXSTD=11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 From a403f8269121f7789bd0c632617f28fc35ee0cd5 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 9 May 2020 03:57:27 +0300 Subject: [PATCH 2/6] Disable -Wdeprecated-volatile --- test/variant_get_by_index.cpp | 6 ++++++ test/variant_get_by_type.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/test/variant_get_by_index.cpp b/test/variant_get_by_index.cpp index 2728196..97ef08b 100644 --- a/test/variant_get_by_index.cpp +++ b/test/variant_get_by_index.cpp @@ -15,6 +15,12 @@ using namespace boost::variant2; +#if defined( __clang__ ) && defined( __has_warning ) +# if __has_warning( "-Wdeprecated-volatile" ) +# pragma clang diagnostic ignored "-Wdeprecated-volatile" +# endif +#endif + int main() { { diff --git a/test/variant_get_by_type.cpp b/test/variant_get_by_type.cpp index 47daa94..4c8476d 100644 --- a/test/variant_get_by_type.cpp +++ b/test/variant_get_by_type.cpp @@ -15,6 +15,12 @@ using namespace boost::variant2; +#if defined( __clang__ ) && defined( __has_warning ) +# if __has_warning( "-Wdeprecated-volatile" ) +# pragma clang diagnostic ignored "-Wdeprecated-volatile" +# endif +#endif + int main() { { From fa92e40b359a05b599c28a212f3ec848be6f48f0 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 9 May 2020 04:31:26 +0300 Subject: [PATCH 3/6] Disable failing constexpr tests on g++ 10.1 --- test/variant_in_place_index_construct_cx.cpp | 15 ++++++++++----- test/variant_in_place_type_construct_cx.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/test/variant_in_place_index_construct_cx.cpp b/test/variant_in_place_index_construct_cx.cpp index 80a6934..402614c 100644 --- a/test/variant_in_place_index_construct_cx.cpp +++ b/test/variant_in_place_index_construct_cx.cpp @@ -7,11 +7,8 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include -#include -#include -#include -#include +#include +#include using namespace boost::variant2; @@ -108,9 +105,17 @@ int main() STATIC_ASSERT( v.index() == 4 ); } +#if BOOST_WORKAROUND(BOOST_GCC, == 100100) + + // no idea why this fails on g++ 10 + +#else + { constexpr variant v( in_place_index_t<5>{}, 0, 0 ); STATIC_ASSERT( v.index() == 5 ); } + +#endif } diff --git a/test/variant_in_place_type_construct_cx.cpp b/test/variant_in_place_type_construct_cx.cpp index a64c347..0effec8 100644 --- a/test/variant_in_place_type_construct_cx.cpp +++ b/test/variant_in_place_type_construct_cx.cpp @@ -7,6 +7,8 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include +#include using namespace boost::variant2; @@ -100,6 +102,12 @@ int main() STATIC_ASSERT( holds_alternative(v) ); } +#if BOOST_WORKAROUND(BOOST_GCC, == 100100) + + // no idea why this fails on g++ 10 + +#else + { constexpr variant v( in_place_type_t{}, 0, 0 ); @@ -107,4 +115,6 @@ int main() STATIC_ASSERT( holds_alternative(v) ); } + +#endif } From 1d79adfca0ac3880c86a0c7472962c1d2085ba11 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 8 May 2020 23:31:54 +0300 Subject: [PATCH 4/6] Add gcc-10 to Travis --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index 98a6bb9..e0dc1a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,6 +92,17 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + dist: bionic + compiler: g++-10 + env: TOOLSET=gcc COMPILER=g++-10 CXXSTD=11,14,17,2a + addons: + apt: + packages: + - g++-10 + sources: + - ubuntu-toolchain-r-test + - os: linux compiler: g++-8 env: UBSAN=1 TOOLSET=gcc COMPILER=g++-8 CXXSTD=11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold From 75f574fc48b1cf829cc98f21638e846bdcd460a4 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 9 May 2020 04:42:27 +0300 Subject: [PATCH 5/6] Move warning suppression before the includes --- test/variant_get_by_index.cpp | 12 ++++++------ test/variant_get_by_type.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/variant_get_by_index.cpp b/test/variant_get_by_index.cpp index 97ef08b..846d0ba 100644 --- a/test/variant_get_by_index.cpp +++ b/test/variant_get_by_index.cpp @@ -6,6 +6,12 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#if defined( __clang__ ) && defined( __has_warning ) +# if __has_warning( "-Wdeprecated-volatile" ) +# pragma clang diagnostic ignored "-Wdeprecated-volatile" +# endif +#endif + #include #include #include @@ -15,12 +21,6 @@ using namespace boost::variant2; -#if defined( __clang__ ) && defined( __has_warning ) -# if __has_warning( "-Wdeprecated-volatile" ) -# pragma clang diagnostic ignored "-Wdeprecated-volatile" -# endif -#endif - int main() { { diff --git a/test/variant_get_by_type.cpp b/test/variant_get_by_type.cpp index 4c8476d..8f44a7e 100644 --- a/test/variant_get_by_type.cpp +++ b/test/variant_get_by_type.cpp @@ -6,6 +6,12 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#if defined( __clang__ ) && defined( __has_warning ) +# if __has_warning( "-Wdeprecated-volatile" ) +# pragma clang diagnostic ignored "-Wdeprecated-volatile" +# endif +#endif + #include #include #include @@ -15,12 +21,6 @@ using namespace boost::variant2; -#if defined( __clang__ ) && defined( __has_warning ) -# if __has_warning( "-Wdeprecated-volatile" ) -# pragma clang diagnostic ignored "-Wdeprecated-volatile" -# endif -#endif - int main() { { From 03019860dfa60170d2f4271a1aad70cb081c0d11 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 9 May 2020 05:10:28 +0300 Subject: [PATCH 6/6] Fix gcc-10 version check --- test/variant_in_place_index_construct_cx.cpp | 2 +- test/variant_in_place_type_construct_cx.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/variant_in_place_index_construct_cx.cpp b/test/variant_in_place_index_construct_cx.cpp index 402614c..addc8fc 100644 --- a/test/variant_in_place_index_construct_cx.cpp +++ b/test/variant_in_place_index_construct_cx.cpp @@ -105,7 +105,7 @@ int main() STATIC_ASSERT( v.index() == 4 ); } -#if BOOST_WORKAROUND(BOOST_GCC, == 100100) +#if BOOST_WORKAROUND(BOOST_GCC, >= 100000 && BOOST_GCC < 100200) // no idea why this fails on g++ 10 diff --git a/test/variant_in_place_type_construct_cx.cpp b/test/variant_in_place_type_construct_cx.cpp index 0effec8..e47ca46 100644 --- a/test/variant_in_place_type_construct_cx.cpp +++ b/test/variant_in_place_type_construct_cx.cpp @@ -102,7 +102,7 @@ int main() STATIC_ASSERT( holds_alternative(v) ); } -#if BOOST_WORKAROUND(BOOST_GCC, == 100100) +#if BOOST_WORKAROUND(BOOST_GCC, >= 100000 && BOOST_GCC < 100200) // no idea why this fails on g++ 10