This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[wide-int]: Bump up buffer for printing
- From: Mike Stump <mikestump at comcast dot net>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Dec 2013 15:22:50 -0800
- Subject: [wide-int]: Bump up buffer for printing
- Authentication-results: sourceware.org; auth=none
The buffer was too small… The print routines when printing in hex, use the precision to form the output, and negative numbers have a few more ffffs in front than we might otherwise expect for the largest in on the machine.
Ok?
diff --git a/gcc/wide-int-print.h b/gcc/wide-int-print.h
index be93cd1..af07517 100644
--- a/gcc/wide-int-print.h
+++ b/gcc/wide-int-print.h
@@ -23,7 +23,8 @@ along with GCC; see the file COPYING3. If not see
#include <stdio.h>
#include "wide-int.h"
-#define WIDE_INT_PRINT_BUFFER_SIZE (MAX_BITSIZE_MODE_ANY_INT / 4 + 4)
+#define WIDE_INT_PRINT_BUFFER_SIZE (WIDE_INT_MAX_PRECISION / 4 + 4)
+
/* Printing functions. */
extern void print_dec (const wide_int &wi, char *buf, signop sgn);