From 4eb6f626f84779f7ba5a12f93acbaafd742c6851 Mon Sep 17 00:00:00 2001 From: Dino Radakovic Date: Thu, 18 Apr 2024 06:47:29 -0700 Subject: `str_format/convert_test`: Delete workaround for [glibc bug](https://sourceware.org/bugzilla/show_bug.cgi?id=22142) RHEL7 ships an affected version of glibc, but this bug is specific to powerpc, which abseil [does not support](https://github.com/google/oss-policies-info/blob/4ec9f2a979a6c6b7bb148040347c8d2b1def09fa/foundational-cxx-support-matrix.md). PiperOrigin-RevId: 626018125 Change-Id: I1875aee6c37e69f712ef91e41da455af9d00fb5f --- absl/strings/internal/str_format/convert_test.cc | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'absl/strings/internal') diff --git a/absl/strings/internal/str_format/convert_test.cc b/absl/strings/internal/str_format/convert_test.cc index 7f222778..3e761373 100644 --- a/absl/strings/internal/str_format/convert_test.cc +++ b/absl/strings/internal/str_format/convert_test.cc @@ -946,32 +946,9 @@ TEST_F(FormatConvertTest, Double) { } } - // Workaround libc bug. - // https://sourceware.org/bugzilla/show_bug.cgi?id=22142 - const bool gcc_bug_22142 = - StrPrint("%f", std::numeric_limits::max()) != - "1797693134862315708145274237317043567980705675258449965989174768031" - "5726078002853876058955863276687817154045895351438246423432132688946" - "4182768467546703537516986049910576551282076245490090389328944075868" - "5084551339423045832369032229481658085593321233482747978262041447231" - "68738177180919299881250404026184124858368.000000"; - for (int exp = -300; exp <= 300; ++exp) { const double all_ones_mantissa = 0x1fffffffffffff; doubles.push_back(std::ldexp(all_ones_mantissa, exp)); - if (gcc_bug_22142) { - skip_verify.insert(doubles.back()); - } - } - - if (gcc_bug_22142) { - using L = std::numeric_limits; - skip_verify.insert(L::max()); - skip_verify.insert(L::min()); // NOLINT - skip_verify.insert(L::denorm_min()); - skip_verify.insert(-L::max()); - skip_verify.insert(-L::min()); // NOLINT - skip_verify.insert(-L::denorm_min()); } // Remove duplicates to speed up the logic below. -- cgit v1.2.3