summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-05-24 14:41:52 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-05-24 14:41:52 +0000
commit8ae75654ea2c38fc182d092ed764b2a196aca8da (patch)
treea0ab2b1d44f5da5ad35bfc140d8d2d465c625bb7
parent53e5aa1f5ee1b1245bf815d02ad1e3faaf0005ca (diff)
downloadmpfr-8ae75654ea2c38fc182d092ed764b2a196aca8da.tar.gz
Avoid some warnings with "gcc -Wundef".
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10352 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--src/ieee_floats.h5
-rw-r--r--src/mpfr-gmp.h4
-rw-r--r--src/mpfr-impl.h2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/ieee_floats.h b/src/ieee_floats.h
index 101164ec3..42cf6b06c 100644
--- a/src/ieee_floats.h
+++ b/src/ieee_floats.h
@@ -54,13 +54,14 @@ union dbl_bytes {
must be in the compiler used to build the user-end application because
this is where the sNaN will be obtained). */
-#if HAVE_DOUBLE_IEEE_LITTLE_ENDIAN
+#ifdef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN
static const union dbl_bytes dbl_infp =
{ { 0, 0, 0, 0, 0, 0, 0xF0, 0x7F } };
static const union dbl_bytes dbl_infm =
{ { 0, 0, 0, 0, 0, 0, 0xF0, 0xFF } };
#endif
-#if HAVE_DOUBLE_IEEE_BIG_ENDIAN
+
+#ifdef HAVE_DOUBLE_IEEE_BIG_ENDIAN
static const union dbl_bytes dbl_infp =
{ { 0x7F, 0xF0, 0, 0, 0, 0, 0, 0 } };
static const union dbl_bytes dbl_infm =
diff --git a/src/mpfr-gmp.h b/src/mpfr-gmp.h
index 5ea5ac51f..19cd1eef4 100644
--- a/src/mpfr-gmp.h
+++ b/src/mpfr-gmp.h
@@ -444,7 +444,7 @@ typedef const mp_limb_t *mpfr_limb_srcptr;
#ifndef _MPFR_IEEE_FLOATS
-#if HAVE_DOUBLE_IEEE_LITTLE_ENDIAN
+#ifdef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN
#define _MPFR_IEEE_FLOATS 1
union mpfr_ieee_double_extract
{
@@ -459,7 +459,7 @@ union mpfr_ieee_double_extract
};
#endif
-#if HAVE_DOUBLE_IEEE_BIG_ENDIAN
+#ifdef HAVE_DOUBLE_IEEE_BIG_ENDIAN
#define _MPFR_IEEE_FLOATS 1
union mpfr_ieee_double_extract
{
diff --git a/src/mpfr-impl.h b/src/mpfr-impl.h
index 1e9eeaa1b..61d84c6f4 100644
--- a/src/mpfr-impl.h
+++ b/src/mpfr-impl.h
@@ -63,7 +63,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
it can be used by any other header. */
#include "mpfr-cvers.h"
-#if _MPFR_EXP_FORMAT == 4
+#if defined(_MPFR_EXP_FORMAT) && _MPFR_EXP_FORMAT == 4
/* mpfr_exp_t will be defined as intmax_t */
# include "mpfr-intmax.h"
#endif