From d7fb0f9994ed73f8b9b09e0324033e4fd1549582 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 13 Aug 2009 17:03:55 +0000 Subject: merge from gcc --- libdecnumber/ChangeLog | 7 +++++++ libdecnumber/decCommon.c | 2 ++ libdecnumber/decContext.c | 4 ++++ 3 files changed, 13 insertions(+) (limited to 'libdecnumber') diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog index 8cdf161b1d4..4daf9ec1b2b 100644 --- a/libdecnumber/ChangeLog +++ b/libdecnumber/ChangeLog @@ -1,3 +1,10 @@ +2009-08-13 Janis Johnson + + PR c/41046 + * decContext.c (decContextTestEndian): Call printf only if DECCHECK. + * decCommon.c ( decFloatShow): Define function only for DECCHECK + or DECTRACE. + 2009-07-30 Ralf Wildenhues * Makefile.in (aclocal_deps): New variable. diff --git a/libdecnumber/decCommon.c b/libdecnumber/decCommon.c index 192b5cf02f9..add1f2ed716 100644 --- a/libdecnumber/decCommon.c +++ b/libdecnumber/decCommon.c @@ -1157,6 +1157,7 @@ uInt decFloatRadix(const decFloat *df) { return 10; } /* decFloatRadix */ +#if (DECCHECK || DECTRACE) /* ------------------------------------------------------------------ */ /* decFloatShow -- printf a decFloat in hexadecimal and decimal */ /* df is the decFloat to show */ @@ -1183,6 +1184,7 @@ void decFloatShow(const decFloat *df, const char *tag) { printf(">%s> %s [big-endian] %s\n", tag, hexbuf, buff); return; } /* decFloatShow */ +#endif /* ------------------------------------------------------------------ */ /* decFloatToBCD -- get sign, exponent, and BCD8 from a decFloat */ diff --git a/libdecnumber/decContext.c b/libdecnumber/decContext.c index 28bbdbb4929..1756dcb2522 100644 --- a/libdecnumber/decContext.c +++ b/libdecnumber/decContext.c @@ -31,7 +31,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* ------------------------------------------------------------------ */ #include /* for strcmp */ +#ifdef DECCHECK #include /* for printf if DECCHECK */ +#endif #include "dconfig.h" /* for GCC definitions */ #include "decContext.h" /* context and base types */ #include "decNumberLocal.h" /* decNumber local types, etc. */ @@ -395,8 +397,10 @@ Int decContextTestEndian(Flag quiet) { if (!quiet) { if (LITEND) adj="little"; else adj="big"; +#if DECCHECK printf("Warning: DECLITEND is set to %d, but this computer appears to be %s-endian\n", DECLITEND, adj); +#endif } res=(Int)LITEND-dle; } -- cgit v1.2.1