summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryde <ryde@280ebfd0-de03-0410-8827-d642c229c3f4>2002-08-22 00:56:07 +0000
committerryde <ryde@280ebfd0-de03-0410-8827-d642c229c3f4>2002-08-22 00:56:07 +0000
commit5bd2c8c047d9de24a1dc5b277d8aeedc95afba19 (patch)
treeda6d090c191997d65b501169880076a2dab8ed18
parent493ec24c88cc698b675c5587426ad4976d5f6339 (diff)
downloadmpfr-5bd2c8c047d9de24a1dc5b277d8aeedc95afba19.tar.gz
(__mpfr_nan): Clarify comments about HP C and alpha.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2015 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--mpfr-math.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/mpfr-math.h b/mpfr-math.h
index d7beae139..42ee0bae8 100644
--- a/mpfr-math.h
+++ b/mpfr-math.h
@@ -35,10 +35,14 @@ MA 02111-1307, USA. */
#define MPFR_DBL_NAN ((double) NAN)
#else
#ifdef _MPFR_NAN_BYTES
-/* Note: do not use an initialized union, because, though it is standard,
- the HP compiler doesn't like that. Structures are used to get correct
- alignment. */
+/* A struct is used here rather than a union of a float and a char array
+ since union initializers aren't available in K&R, in particular not in
+ the HP bundled cc. Alignment will hopefully be based on the structure
+ size, rather than it's contents, so we should be ok. */
#ifdef __alpha
+/* gcc 3.0.2 on an alphaev56-unknown-freebsd4.3 doesn't seem to correctly
+ convert from a float NAN to a double NAN, use an 8-byte form instead as a
+ workaround. */
static struct { unsigned char c[8]; } __mpfr_nan
= { { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } };
#define MPFR_DBL_NAN (*((double *) __mpfr_nan.c))