mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-09 11:16:45 +08:00
workaround needs for both gcc and clang.
This commit is contained in:
parent
c4fc2bab04
commit
5e6dab242c
@ -1037,7 +1037,9 @@ inline constexpr am_mant_t
|
|||||||
binary_format<double>::max_mantissa_fast_path(am_pow_t power) {
|
binary_format<double>::max_mantissa_fast_path(am_pow_t power) {
|
||||||
// caller is responsible to ensure that
|
// caller is responsible to ensure that
|
||||||
FASTFLOAT_ASSUME(power >= 0 && power <= 22);
|
FASTFLOAT_ASSUME(power >= 0 && power <= 22);
|
||||||
return max_mantissa[power];
|
//
|
||||||
|
// Work around clang and gcc bug https://godbolt.org/z/zedh7rrhc
|
||||||
|
return (void)max_mantissa[0], max_mantissa[power];
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -1045,7 +1047,9 @@ inline constexpr am_mant_t
|
|||||||
binary_format<float>::max_mantissa_fast_path(am_pow_t power) {
|
binary_format<float>::max_mantissa_fast_path(am_pow_t power) {
|
||||||
// caller is responsible to ensure that
|
// caller is responsible to ensure that
|
||||||
FASTFLOAT_ASSUME(power >= 0 && power <= 10);
|
FASTFLOAT_ASSUME(power >= 0 && power <= 10);
|
||||||
return max_mantissa[power];
|
//
|
||||||
|
// Work around clang and gcc bug https://godbolt.org/z/zedh7rrhc
|
||||||
|
return (void)max_mantissa[0], max_mantissa[power];
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -1053,7 +1057,9 @@ inline constexpr double
|
|||||||
binary_format<double>::exact_power_of_ten(am_pow_t power) {
|
binary_format<double>::exact_power_of_ten(am_pow_t power) {
|
||||||
// caller is responsible to ensure that
|
// caller is responsible to ensure that
|
||||||
FASTFLOAT_ASSUME(power >= 0 && power <= 22);
|
FASTFLOAT_ASSUME(power >= 0 && power <= 22);
|
||||||
return powers_of_ten[power];
|
//
|
||||||
|
// Work around clang and gcc bug https://godbolt.org/z/zedh7rrhc
|
||||||
|
return (void)powers_of_ten[0], powers_of_ten[power];
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -1061,7 +1067,9 @@ inline constexpr float
|
|||||||
binary_format<float>::exact_power_of_ten(am_pow_t power) {
|
binary_format<float>::exact_power_of_ten(am_pow_t power) {
|
||||||
// caller is responsible to ensure that
|
// caller is responsible to ensure that
|
||||||
FASTFLOAT_ASSUME(power >= 0 && power <= 10);
|
FASTFLOAT_ASSUME(power >= 0 && power <= 10);
|
||||||
return powers_of_ten[power];
|
//
|
||||||
|
// Work around clang and gcc bug https://godbolt.org/z/zedh7rrhc
|
||||||
|
return (void)powers_of_ten[0], powers_of_ten[power];
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user