Remove preprocessors for now unsupported compilers. PiperOrigin-RevId: 719126950 Change-Id: I0978c295896acdf069175ba99156e8bbf6e1e188
diff --git a/absl/functional/bind_front_test.cc b/absl/functional/bind_front_test.cc index 4801a81..5d94ecc 100644 --- a/absl/functional/bind_front_test.cc +++ b/absl/functional/bind_front_test.cc
@@ -210,13 +210,9 @@ constexpr auto plus5 = absl::bind_front(Plus, five); EXPECT_EQ(plus5(1), 6); - // There seems to be a bug in MSVC dealing constexpr construction of - // char[]. Notice 'plus5' above; 'int' works just fine. -#if !(defined(_MSC_VER) && _MSC_VER < 1910) static constexpr char data[] = "DEF"; constexpr auto g = absl::bind_front(CharAt, data); EXPECT_EQ(g(1), 'E'); -#endif } struct ManglingCall {
diff --git a/absl/strings/charconv.cc b/absl/strings/charconv.cc index 0c9227f..66c12cc 100644 --- a/absl/strings/charconv.cc +++ b/absl/strings/charconv.cc
@@ -359,16 +359,13 @@ bool HandleEdgeCase(const strings_internal::ParsedFloat& input, bool negative, absl::Nonnull<FloatType*> value) { if (input.type == strings_internal::FloatType::kNan) { - // A bug in both clang < 7 and gcc would cause the compiler to optimize - // away the buffer we are building below. Declaring the buffer volatile - // avoids the issue, and has no measurable performance impact in - // microbenchmarks. + // A bug in gcc would cause the compiler to optimize away the buffer we are + // building below. Declaring the buffer volatile avoids the issue, and has + // no measurable performance impact in microbenchmarks. // - // https://bugs.llvm.org/show_bug.cgi?id=37778 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86113 constexpr ptrdiff_t kNanBufferSize = 128; -#if (defined(__GNUC__) && !defined(__clang__)) || \ - (defined(__clang__) && __clang_major__ < 7) +#if (defined(__GNUC__) && !defined(__clang__)) volatile char n_char_sequence[kNanBufferSize]; #else char n_char_sequence[kNanBufferSize];
diff --git a/absl/strings/string_view_test.cc b/absl/strings/string_view_test.cc index e810b25..7064cc7 100644 --- a/absl/strings/string_view_test.cc +++ b/absl/strings/string_view_test.cc
@@ -1123,7 +1123,7 @@ #endif // MSVC 2017+ should be able to construct a constexpr string_view from a cstr. -#if defined(_MSC_VER) && _MSC_VER >= 1910 +#if defined(_MSC_VER) #define ABSL_HAVE_CONSTEXPR_STRING_VIEW_FROM_CSTR 1 #endif @@ -1159,10 +1159,6 @@ #endif #endif -#if !defined(__clang__) || 3 < __clang_major__ || \ - (3 == __clang_major__ && 4 < __clang_minor__) - // older clang versions (< 3.5) complain that: - // "cannot perform pointer arithmetic on null pointer" constexpr absl::string_view::iterator const_begin_empty = sp.begin(); constexpr absl::string_view::iterator const_end_empty = sp.end(); EXPECT_EQ(const_begin_empty, const_end_empty); @@ -1172,7 +1168,6 @@ constexpr absl::string_view::iterator const_end_nullptr = cstr.end(); EXPECT_EQ(const_begin_nullptr, const_end_nullptr); #endif // ABSL_HAVE_STRING_VIEW_FROM_NULLPTR -#endif // !defined(__clang__) || ... constexpr absl::string_view::iterator const_begin = cstr_len.begin(); constexpr absl::string_view::iterator const_end = cstr_len.end();