Skip to content

Commit 830ddf4

Browse files
Drop noop gcc version checks
Since #20413 the minimum required GCC version is 7. Co-authored-by: practicalswift <[email protected]>
1 parent 1e9e4b6 commit 830ddf4

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

src/bench/prevector.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,16 @@
99

1010
#include <bench/bench.h>
1111

12-
// GCC 4.8 is missing some C++11 type_traits,
13-
// https://www.gnu.org/software/gcc/gcc-5/changes.html
14-
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
15-
#define IS_TRIVIALLY_CONSTRUCTIBLE std::has_trivial_default_constructor
16-
#else
17-
#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_default_constructible
18-
#endif
19-
2012
struct nontrivial_t {
2113
int x;
2214
nontrivial_t() :x(-1) {}
2315
SERIALIZE_METHODS(nontrivial_t, obj) { READWRITE(obj.x); }
2416
};
25-
static_assert(!IS_TRIVIALLY_CONSTRUCTIBLE<nontrivial_t>::value,
17+
static_assert(!std::is_trivially_default_constructible<nontrivial_t>::value,
2618
"expected nontrivial_t to not be trivially constructible");
2719

2820
typedef unsigned char trivial_t;
29-
static_assert(IS_TRIVIALLY_CONSTRUCTIBLE<trivial_t>::value,
21+
static_assert(std::is_trivially_default_constructible<trivial_t>::value,
3022
"expected trivial_t to be trivially constructible");
3123

3224
template <typename T>

src/test/fuzz/addition_overflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#if __has_builtin(__builtin_add_overflow)
1515
#define HAVE_BUILTIN_ADD_OVERFLOW
1616
#endif
17-
#elif defined(__GNUC__) && (__GNUC__ >= 5)
17+
#elif defined(__GNUC__)
1818
#define HAVE_BUILTIN_ADD_OVERFLOW
1919
#endif
2020

src/test/fuzz/multiplication_overflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#if __has_builtin(__builtin_mul_overflow)
1515
#define HAVE_BUILTIN_MUL_OVERFLOW
1616
#endif
17-
#elif defined(__GNUC__) && (__GNUC__ >= 5)
17+
#elif defined(__GNUC__)
1818
#define HAVE_BUILTIN_MUL_OVERFLOW
1919
#endif
2020

0 commit comments

Comments
 (0)