Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/literal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@ struct FloatTraitsBase<float> {
using Uint = uint32_t;
static constexpr int kBits = sizeof(Uint) * 8;
static constexpr int kSigBits = 23;
#ifdef _AIX
// AIX defines HUGE_VAL and HUGE_VALF as reinterpret_cast expressions, which
// can't be constexpr.
static constexpr float kHugeVal = std::numeric_limits<float>::infinity();
#else
static constexpr float kHugeVal = HUGE_VALF;
Comment thread
TaylorRichberger marked this conversation as resolved.
#endif

static constexpr int kMaxHexBufferSize = WABT_MAX_FLOAT_HEX;

static float Strto(const char* s, char** endptr) {
Expand All @@ -81,7 +88,13 @@ struct FloatTraitsBase<double> {
using Uint = uint64_t;
static constexpr int kBits = sizeof(Uint) * 8;
static constexpr int kSigBits = 52;
static constexpr float kHugeVal = HUGE_VAL;
#ifdef _AIX
// AIX defines HUGE_VAL and HUGE_VALF as reinterpret_cast expressions, which
// can't be constexpr.
static constexpr double kHugeVal = std::numeric_limits<double>::infinity();
#else
static constexpr double kHugeVal = HUGE_VAL;
#endif
static constexpr int kMaxHexBufferSize = WABT_MAX_DOUBLE_HEX;

static double Strto(const char* s, char** endptr) {
Expand Down
Loading