From 852b7a29c489f6fd584503e456f3e7630104e228 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Fri, 30 Apr 2004 21:58:07 +0000 Subject: [PATCH] * src/integer/output/cl_I_print.cc (print_integer): workaround GCC compiler bug (cf. Debian bug#246319). --- ChangeLog | 5 +++++ src/integer/output/cl_I_print.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 806fb38..44a3076 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-04-30 Richard B. Kreckel + + * src/integer/output/cl_I_print.cc (print_integer): workaround + GCC compiler bug (cf. Debian bug#246319). + 2004-03-20 Ralf Wildenhues * m4/gmp.m4 (CL_GMP_CHECK): Do not lose LIBS setting with config.cache diff --git a/src/integer/output/cl_I_print.cc b/src/integer/output/cl_I_print.cc index 65688b4..541709b 100644 --- a/src/integer/output/cl_I_print.cc +++ b/src/integer/output/cl_I_print.cc @@ -28,6 +28,11 @@ void print_integer (std::ostream& stream, unsigned int base, const cl_I& z) var uintL need = cl_digits_need(abs_z,base); var uintB* ziffern = cl_alloc_array(uintB,need); // Platz für die Ziffern var cl_digits erg; erg.LSBptr = &ziffern[need]; +#if (defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ < 4)) + // workaround GCC-3 compiler bug fixed in GCC-3.4.0 (cf. Debian bug#246319) + static char dummy[40]; + snprintf(dummy,40,"%d%x%x",need,&erg,erg.LSBptr); +#endif I_to_digits(abs_z,(uintD)base,&erg); // Umwandlung in Ziffern // Ziffern ausgeben: {