Skip to content

Commit 76bb243

Browse files
authored
Abseil LTS Branch, May 2025, Patch 1 (#1900)
Fix conditional constexpr in ToInt64{Nano|Micro|Milli}seconds under GCC7 and GCC8 using an else clause as a workaround Fix -Wundef warning
1 parent bc257a8 commit 76bb243

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module(
1818
name = "abseil-cpp",
19-
version = "20250512.0",
19+
version = "20250512.1",
2020
compatibility_level = 1,
2121
)
2222

absl/base/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
// LTS releases can be obtained from
119119
// https://github.com/abseil/abseil-cpp/releases.
120120
#define ABSL_LTS_RELEASE_VERSION 20250512
121-
#define ABSL_LTS_RELEASE_PATCH_LEVEL 0
121+
#define ABSL_LTS_RELEASE_PATCH_LEVEL 1
122122

123123
// Helper macro to convert a CPP variable to a string literal.
124124
#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x

absl/hash/internal/hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// For feature testing and determining which headers can be included.
4141
#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L || \
42-
ABSL_INTERNAL_VERSION_HEADER_AVAILABLE
42+
defined(ABSL_INTERNAL_VERSION_HEADER_AVAILABLE)
4343
#include <version>
4444
#else
4545
#include <ciso646>

absl/time/time.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,8 +1869,9 @@ ABSL_ATTRIBUTE_CONST_FUNCTION constexpr int64_t ToInt64Nanoseconds(Duration d) {
18691869
time_internal::GetRepHi(d) >> 33 == 0) {
18701870
return (time_internal::GetRepHi(d) * 1000 * 1000 * 1000) +
18711871
(time_internal::GetRepLo(d) / time_internal::kTicksPerNanosecond);
1872+
} else {
1873+
return d / Nanoseconds(1);
18721874
}
1873-
return d / Nanoseconds(1);
18741875
}
18751876

18761877
ABSL_ATTRIBUTE_CONST_FUNCTION constexpr int64_t ToInt64Microseconds(
@@ -1880,8 +1881,9 @@ ABSL_ATTRIBUTE_CONST_FUNCTION constexpr int64_t ToInt64Microseconds(
18801881
return (time_internal::GetRepHi(d) * 1000 * 1000) +
18811882
(time_internal::GetRepLo(d) /
18821883
(time_internal::kTicksPerNanosecond * 1000));
1884+
} else {
1885+
return d / Microseconds(1);
18831886
}
1884-
return d / Microseconds(1);
18851887
}
18861888

18871889
ABSL_ATTRIBUTE_CONST_FUNCTION constexpr int64_t ToInt64Milliseconds(
@@ -1891,8 +1893,9 @@ ABSL_ATTRIBUTE_CONST_FUNCTION constexpr int64_t ToInt64Milliseconds(
18911893
return (time_internal::GetRepHi(d) * 1000) +
18921894
(time_internal::GetRepLo(d) /
18931895
(time_internal::kTicksPerNanosecond * 1000 * 1000));
1896+
} else {
1897+
return d / Milliseconds(1);
18941898
}
1895-
return d / Milliseconds(1);
18961899
}
18971900

18981901
ABSL_ATTRIBUTE_CONST_FUNCTION constexpr int64_t ToInt64Seconds(Duration d) {

0 commit comments

Comments
 (0)