Commit 0ca73d34 by Janis Johnson Committed by Janis Johnson

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
parent 241547bb
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> 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in (aclocal_deps): New variable. * Makefile.in (aclocal_deps): New variable.
......
...@@ -1157,6 +1157,7 @@ uInt decFloatRadix(const decFloat *df) { ...@@ -1157,6 +1157,7 @@ uInt decFloatRadix(const decFloat *df) {
return 10; return 10;
} /* decFloatRadix */ } /* decFloatRadix */
#if (DECCHECK || DECTRACE)
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/* decFloatShow -- printf a decFloat in hexadecimal and decimal */ /* decFloatShow -- printf a decFloat in hexadecimal and decimal */
/* df is the decFloat to show */ /* df is the decFloat to show */
...@@ -1183,6 +1184,7 @@ void decFloatShow(const decFloat *df, const char *tag) { ...@@ -1183,6 +1184,7 @@ void decFloatShow(const decFloat *df, const char *tag) {
printf(">%s> %s [big-endian] %s\n", tag, hexbuf, buff); printf(">%s> %s [big-endian] %s\n", tag, hexbuf, buff);
return; return;
} /* decFloatShow */ } /* decFloatShow */
#endif
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/* decFloatToBCD -- get sign, exponent, and BCD8 from a decFloat */ /* decFloatToBCD -- get sign, exponent, and BCD8 from a decFloat */
......
...@@ -31,7 +31,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -31,7 +31,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
#include <string.h> /* for strcmp */ #include <string.h> /* for strcmp */
#ifdef DECCHECK
#include <stdio.h> /* for printf if DECCHECK */ #include <stdio.h> /* for printf if DECCHECK */
#endif
#include "dconfig.h" /* for GCC definitions */ #include "dconfig.h" /* for GCC definitions */
#include "decContext.h" /* context and base types */ #include "decContext.h" /* context and base types */
#include "decNumberLocal.h" /* decNumber local types, etc. */ #include "decNumberLocal.h" /* decNumber local types, etc. */
...@@ -395,8 +397,10 @@ Int decContextTestEndian(Flag quiet) { ...@@ -395,8 +397,10 @@ Int decContextTestEndian(Flag quiet) {
if (!quiet) { if (!quiet) {
if (LITEND) adj="little"; if (LITEND) adj="little";
else adj="big"; else adj="big";
#if DECCHECK
printf("Warning: DECLITEND is set to %d, but this computer appears to be %s-endian\n", printf("Warning: DECLITEND is set to %d, but this computer appears to be %s-endian\n",
DECLITEND, adj); DECLITEND, adj);
#endif
} }
res=(Int)LITEND-dle; res=(Int)LITEND-dle;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment