Browse Source

GCC 7.3 buildfix: only use [[fallthrough]] attribute on C++17

master
Giel van Schijndel 1 year ago
parent
commit
b80b26b2d3
2 changed files with 8 additions and 1 deletions
  1. 4
    0
      .travis.yml
  2. 4
    1
      src/format-helpers.cpp

+ 4
- 0
.travis.yml View File

@@ -24,6 +24,10 @@ matrix:
compiler: gcc
env: CMAKE_CXX_STANDARD=14 CMAKE_CXX_COMPILER=/usr/bin/g++-5
addons: {apt: {packages: [*global_pkgs, g++-5], sources: *toolchain_sources}}
- os: linux
compiler: gcc
env: CMAKE_CXX_STANDARD=17 CMAKE_CXX_COMPILER=/usr/bin/g++-7
addons: {apt: {packages: [*global_pkgs, g++-7], sources: *toolchain_sources}}
before_install:
- if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then brew update && brew install ninja; fi
script:

+ 4
- 1
src/format-helpers.cpp View File

@@ -179,7 +179,10 @@ namespace AwesomeAssert
case msg::operator_: return os << TColor::Yellow;
case msg::error: return os << TColor::Red;
case msg::heading: return os << TColor::Grey;
case msg::location_info: [[fallthrough]];
case msg::location_info:
#if __cplusplus >= 201703L
[[fallthrough]];
#endif
case msg::title: return os << TColor::Bright;
}
}

Loading…
Cancel
Save