mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 07:58:23 +08:00
[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
This commit is contained in:
@@ -130,8 +130,8 @@ get_table_positive(int exponent, size_t i, const size_t constant) {
|
||||
// calculations.
|
||||
// The formula being used looks more like this:
|
||||
// floor(10^(9*(-i)) * 2^(c_0 + (-e))) % (10^9 * 2^c_0)
|
||||
constexpr inline cpp::UInt<MID_INT_SIZE>
|
||||
get_table_negative(int exponent, size_t i, const size_t constant) {
|
||||
inline cpp::UInt<MID_INT_SIZE> get_table_negative(int exponent, size_t i,
|
||||
const size_t constant) {
|
||||
constexpr size_t INT_SIZE = 1024;
|
||||
int shift_amount = constant - exponent;
|
||||
cpp::UInt<INT_SIZE> num(1);
|
||||
|
||||
Reference in New Issue
Block a user