Skip to content

Commit abcdc26

Browse files
committed
[libc] get_table_negative cannot be constexpr
GCC complains about if conditions not being constant expressions. As-is get_table_negative cannot be marked constexpr. Differential Revision: https://reviews.llvm.org/D140967
1 parent 3fe7f6a commit abcdc26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/src/__support/float_to_string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ get_table_positive(int exponent, size_t i, const size_t constant) {
130130
// calculations.
131131
// The formula being used looks more like this:
132132
// floor(10^(9*(-i)) * 2^(c_0 + (-e))) % (10^9 * 2^c_0)
133-
constexpr inline cpp::UInt<MID_INT_SIZE>
134-
get_table_negative(int exponent, size_t i, const size_t constant) {
133+
inline cpp::UInt<MID_INT_SIZE> get_table_negative(int exponent, size_t i,
134+
const size_t constant) {
135135
constexpr size_t INT_SIZE = 1024;
136136
int shift_amount = constant - exponent;
137137
cpp::UInt<INT_SIZE> num(1);

0 commit comments

Comments
 (0)