From 5177518fe3ed1f93c1432f4b96d8cb5d673d1be1 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 22 Jul 2018 18:25:35 +0100 Subject: [PATCH] Fix missing \n at end of file, Fix some clang warnings. Add gcc 7&8 to CI tests. --- .travis.yml | 36 ++++++++++++++++++++++++++++ include/boost/regex/v4/instances.hpp | 2 ++ test/test_warnings.cpp | 19 ++++++++++++++- 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ae6c5e50..4b1ab15e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -102,6 +102,42 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11 CXXSTD_DIALECT=cxxstd-dialect=gnu + addons: + apt: + packages: + - g++-7 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=14,1z CXXSTD_DIALECT=cxxstd-dialect=gnu + addons: + apt: + packages: + - g++-7 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11 CXXSTD_DIALECT=cxxstd-dialect=gnu + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=14,1z CXXSTD_DIALECT=cxxstd-dialect=gnu + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 diff --git a/include/boost/regex/v4/instances.hpp b/include/boost/regex/v4/instances.hpp index b70437e7..f695f01a 100644 --- a/include/boost/regex/v4/instances.hpp +++ b/include/boost/regex/v4/instances.hpp @@ -124,8 +124,10 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_ma #ifdef __clang__ #pragma clang diagnostic push +#if (__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ > 5)) #pragma clang diagnostic ignored "-Wkeyword-macro" #endif +#endif # ifndef BOOST_REGEX_INSTANTIATE # ifdef __GNUC__ diff --git a/test/test_warnings.cpp b/test/test_warnings.cpp index 1c2a41d3..f85d437d 100644 --- a/test/test_warnings.cpp +++ b/test/test_warnings.cpp @@ -1,7 +1,23 @@ +/* +* +* Copyright (c) 2018 +* John Maddock +* +* Use, modification and distribution are subject to the +* Boost Software License, Version 1.0. (See accompanying file +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +* +*/ + + #ifdef _MSC_VER #pragma warning(disable:4820 4668) #endif +#ifdef __APPLE_CC__ +#pragma clang diagnostic ignored "-Wc++11-long-long" +#endif + #include void test_proc() @@ -9,4 +25,5 @@ void test_proc() std::string text, re; boost::regex exp(re); regex_match(text, exp); -} \ No newline at end of file +} +