diff options
author | Janis Johnson <janis187@us.ibm.com> | 2009-08-13 16:54:28 +0000 |
---|---|---|
committer | Janis Johnson <janis@gcc.gnu.org> | 2009-08-13 16:54:28 +0000 |
commit | 0ca73d34ae37bdf76a6111bba28b83973d32dc87 (patch) | |
tree | 8fe9638d21e7a9d77c2ce6ecfd31fd0503112473 /libdecnumber | |
parent | 241547bbe5135b37a8b99bcb806000280b63970b (diff) | |
download | gcc-0ca73d34ae37bdf76a6111bba28b83973d32dc87.zip gcc-0ca73d34ae37bdf76a6111bba28b83973d32dc87.tar.gz gcc-0ca73d34ae37bdf76a6111bba28b83973d32dc87.tar.bz2 |
re PR c/41046 (decNumber leaves printf call in libgcc)
PR c/41046
* decContext.c (decContextTestEndian): Call printf only if DECCHECK.
* decCommon.c ( decFloatShow): Define function only for DECCHECK
or DECTRACE.
From-SVN: r150720
Diffstat (limited to 'libdecnumber')
-rw-r--r-- | libdecnumber/ChangeLog | 7 | ||||
-rw-r--r-- | libdecnumber/decCommon.c | 2 | ||||
-rw-r--r-- | libdecnumber/decContext.c | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog index 8cdf161..4daf9ec 100644 --- a/libdecnumber/ChangeLog +++ b/libdecnumber/ChangeLog @@ -1,3 +1,10 @@ +2009-08-13 Janis Johnson <janis187@us.ibm.com> + + 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 <Ralf.Wildenhues@gmx.de> * Makefile.in (aclocal_deps): New variable. diff --git a/libdecnumber/decCommon.c b/libdecnumber/decCommon.c index 192b5cf..add1f2e 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 28bbdbb..1756dcb 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 <string.h> /* for strcmp */ +#ifdef DECCHECK #include <stdio.h> /* 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; } |