Commit 1e12db05 authored by Kenton Varda's avatar Kenton Varda

Improve inf/nan. This also makes GCC encode them consistently with Clang and…

Improve inf/nan.  This also makes GCC encode them consistently with Clang and with the existing testdata.
parent 3097f779
......@@ -429,8 +429,8 @@ static constexpr MinValue_ minValue = MinValue_();
//
// `char` is not supported, but `signed char` and `unsigned char` are.
inline float inf() { return 1.0f / 0.0f; }
inline float nan() { return 0.0f / 0.0f; }
inline constexpr float inf() { return __builtin_huge_valf(); }
inline constexpr float nan() { return __builtin_nanf(""); }
// =======================================================================================
// Useful fake containers
......
linux-gcc-4.7 1704 ./super-test.sh tmpdir capnp-gcc-4.7 quick
linux-gcc-4.8 1707 ./super-test.sh tmpdir capnp-gcc-4.8 quick gcc-4.8
linux-clang 1745 ./super-test.sh tmpdir capnp-clang quick clang
mac 791 ./super-test.sh remote beat caffeinate quick
mac 802 ./super-test.sh remote beat caffeinate quick
cygwin 795 ./super-test.sh remote Kenton@flashman quick
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment