aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/tests
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2005-05-19 09:05:45 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2005-05-19 07:05:45 +0000
commit925a448751fd6d7988db51070b585e4fd55766a2 (patch)
treeb868266a6c9589956b7ebb466b05e348d7f83b8b /fixincludes/tests
parent7a774cac8861957f4adfe4084e8ab4ee863f15d4 (diff)
downloadgcc-925a448751fd6d7988db51070b585e4fd55766a2.zip
gcc-925a448751fd6d7988db51070b585e4fd55766a2.tar.gz
gcc-925a448751fd6d7988db51070b585e4fd55766a2.tar.bz2
re PR target/19933 (Problem with define of HUGE_VAL in math_c99.)
fixincludes/ PR target/19933 PR target/21315 * inclhack.def: New fixes solaris_math_[1-9]. * fixincl.x: Regenerate. * tests/base/iso/math_c99.h: New. gcc/testsuite/ * gcc.dg/c99-math.h: New * gcc.dg/c99-math-float-1.c: New test. * gcc.dg/c99-math-double-1.c: Likewise. * gcc.dg/c99-math-long-double-1.c: Likewise. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r99953
Diffstat (limited to 'fixincludes/tests')
-rw-r--r--fixincludes/tests/base/iso/math_c99.h112
1 files changed, 112 insertions, 0 deletions
diff --git a/fixincludes/tests/base/iso/math_c99.h b/fixincludes/tests/base/iso/math_c99.h
new file mode 100644
index 0000000..86b6c20
--- /dev/null
+++ b/fixincludes/tests/base/iso/math_c99.h
@@ -0,0 +1,112 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/iso/math_c99.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( SOLARIS_MATH_1_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef HUGE_VAL
+#define HUGE_VAL (__builtin_huge_val())
+#undef HUGE_VALF
+#define HUGE_VALF (__builtin_huge_valf())
+#undef HUGE_VALL
+#define HUGE_VALL (__builtin_huge_vall())
+#endif /* SOLARIS_MATH_1_CHECK */
+
+
+#if defined( SOLARIS_MATH_2_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef INFINITY
+#define INFINITY (__builtin_inff())
+#endif /* SOLARIS_MATH_2_CHECK */
+
+
+#if defined( SOLARIS_MATH_3_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef NAN
+#define NAN (__builtin_nanf(""))
+#endif /* SOLARIS_MATH_3_CHECK */
+
+
+#if defined( SOLARIS_MATH_4_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef fpclassify
+#define fpclassify(x) \
+ __extension__ ({ __typeof(x) __x_fp = (x); \
+ isnan(__x_fp) \
+ ? FP_NAN \
+ : isinf(__x_fp) \
+ ? FP_INFINITE \
+ : isnormal(__x_fp) \
+ ? FP_NORMAL \
+ : __x_fp == 0.0 \
+ ? FP_ZERO \
+ : FP_SUBNORMAL; })
+#endif /* SOLARIS_MATH_4_CHECK */
+
+
+#if defined( SOLARIS_MATH_5_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isfinite
+#define isfinite(x) \
+ __extension__ ({ __typeof (x) __x_f = (x); \
+ __builtin_expect(!isnan(__x_f - __x_f), 1); })
+#endif /* SOLARIS_MATH_5_CHECK */
+
+
+#if defined( SOLARIS_MATH_6_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isinf
+#define isinf(x) \
+ __extension__ ({ __typeof (x) __x_i = (x); \
+ __builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); })
+#endif /* SOLARIS_MATH_6_CHECK */
+
+
+#if defined( SOLARIS_MATH_7_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isnormal
+#define isnormal(x) \
+ __extension__ ({ __typeof(x) __x_n = (x); \
+ if (__x_n < 0.0) __x_n = -__x_n; \
+ __builtin_expect(isfinite(__x_n) \
+ && (sizeof(__x_n) == sizeof(float) \
+ ? __x_n >= __FLT_MIN__ \
+ : sizeof(__x_n) == sizeof(long double) \
+ ? __x_n >= __LDBL_MIN__ \
+ : __x_n >= __DBL_MIN__), 1); })
+#endif /* SOLARIS_MATH_7_CHECK */
+
+
+#if defined( SOLARIS_MATH_8_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef signbit
+#define signbit(x) (sizeof(x) == sizeof(float) \
+ ? __builtin_signbitf(x) \
+ : sizeof(x) == sizeof(long double) \
+ ? __builtin_signbitl(x) \
+ : __builtin_signbit(x))
+#endif /* SOLARIS_MATH_8_CHECK */
+
+
+#if defined( SOLARIS_MATH_9_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isgreater
+#define isgreater(x, y) __builtin_isgreater(x, y)
+#undef isgreaterequal
+#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
+#undef isless
+#define isless(x, y) __builtin_isless(x, y)
+#undef islessequal
+#define islessequal(x, y) __builtin_islessequal(x, y)
+#undef islessgreater
+#define islessgreater(x, y) __builtin_islessgreater(x, y)
+#undef isunordered
+#define isunordered(x, y) __builtin_isunordered(x, y)
+#endif /* SOLARIS_MATH_9_CHECK */