diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2022-02-27 19:47:25 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2022-02-27 19:47:25 +0000 |
commit | d1574a9b820f17adb9004255e2018967e9be063b (patch) | |
tree | fb1f8899bf13f4fcb97aded9f5e3c33bfed52420 /fixincludes/tests | |
parent | ae957797a16c0361b8b59c4a045e696cef171f19 (diff) | |
download | gcc-d1574a9b820f17adb9004255e2018967e9be063b.zip gcc-d1574a9b820f17adb9004255e2018967e9be063b.tar.gz gcc-d1574a9b820f17adb9004255e2018967e9be063b.tar.bz2 |
Fix declarations of _DINFINITY, _SINFINITY and _SQNAN
The declarations of _DINFINITY, _SINFINITY and _SQNAN need to be constant
expressions.
2022-02-27 John David Anglin <danglin@gcc.gnu.org>
fixincludes/ChangeLog:
* inclhack.def (hpux_math_constexpr): New hack.
* fixincl.x: Regenerate.
* tests/base/math.h: Update.
Diffstat (limited to 'fixincludes/tests')
-rw-r--r-- | fixincludes/tests/base/math.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fixincludes/tests/base/math.h b/fixincludes/tests/base/math.h index 7525fd8..29b6757 100644 --- a/fixincludes/tests/base/math.h +++ b/fixincludes/tests/base/math.h @@ -57,6 +57,13 @@ #endif /* HPUX11_CPP_POW_INLINE_CHECK */ +#if defined( HPUX_MATH_CONSTEXPR_CHECK ) +# define _DINFINITY (__builtin_inf ()) +# define _SINFINITY (__builtin_inff ()) +# define _SQNAN (__builtin_nanf ("")) +#endif /* HPUX_MATH_CONSTEXPR_CHECK */ + + #if defined( HPUX11_FABSF_CHECK ) #ifdef _PA_RISC #ifndef __cplusplus |