DEF_LIB_BUILTIN (BUILT_IN_MODF, "modf", BT_FN_DOUBLE_DOUBLE_DOUBLEPTR, ATTR_MATHFN_FPROUNDING_STORE)
DEF_C99_C90RES_BUILTIN (BUILT_IN_MODFF, "modff", BT_FN_FLOAT_FLOAT_FLOATPTR, ATTR_MATHFN_FPROUNDING_STORE)
DEF_C99_C90RES_BUILTIN (BUILT_IN_MODFL, "modfl", BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLEPTR, ATTR_MATHFN_FPROUNDING_STORE)
-DEF_GCC_BUILTIN (BUILT_IN_NAN, "nan", BT_FN_DOUBLE_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
-DEF_GCC_BUILTIN (BUILT_IN_NANF, "nanf", BT_FN_FLOAT_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
-DEF_GCC_BUILTIN (BUILT_IN_NANL, "nanl", BT_FN_LONGDOUBLE_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
+DEF_C99_BUILTIN (BUILT_IN_NAN, "nan", BT_FN_DOUBLE_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
+DEF_C99_BUILTIN (BUILT_IN_NANF, "nanf", BT_FN_FLOAT_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
+DEF_C99_BUILTIN (BUILT_IN_NANL, "nanl", BT_FN_LONGDOUBLE_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
DEF_GCC_BUILTIN (BUILT_IN_NAND32, "nand32", BT_FN_DFLOAT32_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
DEF_GCC_BUILTIN (BUILT_IN_NAND64, "nand64", BT_FN_DFLOAT64_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
DEF_GCC_BUILTIN (BUILT_IN_NAND128, "nand128", BT_FN_DFLOAT128_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL)
DTYPE one = PASTE(1.0, SUFFIX);
DTYPE two = PASTE(2.0, SUFFIX);
-volatile DTYPE x, y, z, nan, inf, m_inf;
+volatile DTYPE x, y, z, _nan, inf, m_inf;
void
test_compares (void)
{
- nan = PASTE(__builtin_nan, SUFFIX2) ("");
- inf = PASTE(__builtin_inf, SUFFIX2) ();
+ _nan = PASTE(__builtin_nan, SUFFIX2) ("");
+ inf = PASTE(__builtin_inf, SUFFIX2) ();
m_inf = - PASTE(__builtin_inf, SUFFIX2) ();
x = PASTE(__builtin_nan, SUFFIX2) ("");
if (x <= two) FAILURE ("<=", "NaN")
if (x <= zero) FAILURE ("<=", "NaN")
if (x <= m_one) FAILURE ("<=", "NaN")
- if (x <= nan) FAILURE ("<=", "NaN")
+ if (x <= _nan) FAILURE ("<=", "NaN")
if (x <= inf) FAILURE ("<=", "NaN")
if (x <= m_inf) FAILURE ("<=", "NaN")
if (two <= x) FAILURE ("<=", "NaN")
if (zero <= x) FAILURE ("<=", "NaN")
if (m_one <= x) FAILURE ("<=", "NaN")
- if (nan <= x) FAILURE ("<=", "NaN")
+ if (_nan <= x) FAILURE ("<=", "NaN")
if (inf <= x) FAILURE ("<=", "NaN")
if (m_inf <= x) FAILURE ("<=", "NaN")
if (x < two) FAILURE ("<", "NaN")
if (x < zero) FAILURE ("<", "NaN")
if (x < m_one) FAILURE ("<", "NaN")
- if (x < nan) FAILURE ("<", "NaN")
+ if (x < _nan) FAILURE ("<", "NaN")
if (x < inf) FAILURE ("<", "NaN")
if (x < m_inf) FAILURE ("<", "NaN")
if (two < x) FAILURE ("<", "NaN")
if (zero < x) FAILURE ("<", "NaN")
if (m_one < x) FAILURE ("<", "NaN")
- if (nan < x) FAILURE ("<", "NaN")
+ if (_nan < x) FAILURE ("<", "NaN")
if (inf < x) FAILURE ("<", "NaN")
if (m_inf < x) FAILURE ("<", "NaN")
if (x >= two) FAILURE (">=", "NaN")
if (x >= zero) FAILURE (">=", "NaN")
if (x >= m_one) FAILURE (">=", "NaN")
- if (x >= nan) FAILURE (">=", "NaN")
+ if (x >= _nan) FAILURE (">=", "NaN")
if (x >= inf) FAILURE (">=", "NaN")
if (x >= m_inf) FAILURE (">=", "NaN")
if (two >= x) FAILURE (">=", "NaN")
if (zero >= x) FAILURE (">=", "NaN")
if (m_one >= x) FAILURE (">=", "NaN")
- if (nan >= x) FAILURE (">=", "NaN")
+ if (_nan >= x) FAILURE (">=", "NaN")
if (inf >= x) FAILURE (">=", "NaN")
if (m_inf >= x) FAILURE (">=", "NaN")
if (x > two) FAILURE (">", "NaN")
if (x > zero) FAILURE (">", "NaN")
if (x > m_one) FAILURE (">", "NaN")
- if (x > nan) FAILURE (">", "NaN")
+ if (x > _nan) FAILURE (">", "NaN")
if (x > inf) FAILURE (">", "NaN")
if (x > m_inf) FAILURE (">", "NaN")
if (two > x) FAILURE (">", "NaN")
if (zero > x) FAILURE (">", "NaN")
if (m_one > x) FAILURE (">", "NaN")
- if (nan > x) FAILURE (">", "NaN")
+ if (_nan > x) FAILURE (">", "NaN")
if (inf > x) FAILURE (">", "NaN")
if (m_inf > x) FAILURE (">", "NaN")
if (x == two) FAILURE ("==", "NaN")
if (x == zero) FAILURE ("==", "NaN")
if (x == m_one) FAILURE ("==", "NaN")
- if (x == nan) FAILURE ("==", "NaN")
+ if (x == _nan) FAILURE ("==", "NaN")
if (x == inf) FAILURE ("==", "NaN")
if (x == m_inf) FAILURE ("==", "NaN")
if (two == x) FAILURE ("==", "NaN")
if (zero == x) FAILURE ("==", "NaN")
if (m_one == x) FAILURE ("==", "NaN")
- if (nan == x) FAILURE ("==", "NaN")
+ if (_nan == x) FAILURE ("==", "NaN")
if (inf == x) FAILURE ("==", "NaN")
if (m_inf == x) FAILURE ("==", "NaN")
if (!(x != two)) FAILURE ("!=", "NaN")
if (!(x != zero)) FAILURE ("!=", "NaN")
if (!(x != m_one)) FAILURE ("!=", "NaN")
- if (!(x != nan)) FAILURE ("!=", "NaN")
+ if (!(x != _nan)) FAILURE ("!=", "NaN")
if (!(x != inf)) FAILURE ("!=", "NaN")
if (!(x != m_inf)) FAILURE ("!=", "NaN")
if (!(two != x)) FAILURE ("!=", "NaN")
if (!(zero != x)) FAILURE ("!=", "NaN")
if (!(m_one != x)) FAILURE ("!=", "NaN")
- if (!(nan != x)) FAILURE ("!=", "NaN")
+ if (!(_nan != x)) FAILURE ("!=", "NaN")
if (!(inf != x)) FAILURE ("!=", "NaN")
if (!(m_inf != x)) FAILURE ("!=", "NaN")