From patchwork Mon Dec 16 23:22:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Stump X-Patchwork-Id: 301924 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D0F652C007B for ; Tue, 17 Dec 2013 10:23:00 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; q=dns; s=default; b=x5js8gtQg1rtFjekXtV1puuLAa C9ax1r75ir4NVdudj/Srrgpkt0fpZAI0n+z/eNWFgc4A/Ihltiimn/IrlIm6WOH2 A3XJKNBRF8Q+mV/+TASpT1Fpk9m3bEGBE8YRivdBoY0BdIeyB4UjR+nWiN1GiO3Q tmx4omA+XxmSN7doc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; s=default; bh=n70FajtV5VhypG8hEWmgjd+Z7QM=; b= WvLYCX7wZdlScYvXij/VKAAPzSaRaGfpUXY6ebiWnwede4jCed3dBA/y3PIIzq0w vE37cMBfq0aE1evlQTf1zxr3Jr3uYu9jp24zm8n+b7iV2ZxZyEYMnYQyPH9VVvb1 f8CxVrDOaO/FQaY3l9z+X4QKjYFdTaejVqKbsa8P6nU= Received: (qmail 7798 invoked by alias); 16 Dec 2013 23:22:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 7789 invoked by uid 89); 16 Dec 2013 23:22:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: qmta10.emeryville.ca.mail.comcast.net Received: from qmta10.emeryville.ca.mail.comcast.net (HELO qmta10.emeryville.ca.mail.comcast.net) (76.96.30.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Dec 2013 23:22:52 +0000 Received: from omta09.emeryville.ca.mail.comcast.net ([76.96.30.20]) by qmta10.emeryville.ca.mail.comcast.net with comcast id 2L7C1n0030S2fkCAAPNrZo; Mon, 16 Dec 2013 23:22:51 +0000 Received: from up.mrs.kithrup.com ([24.4.193.8]) by omta09.emeryville.ca.mail.comcast.net with comcast id 2PNq1n00r0BKwT48VPNrk7; Mon, 16 Dec 2013 23:22:51 +0000 From: Mike Stump Subject: [wide-int]: Bump up buffer for printing Message-Id: <98FCC30C-ACC4-468C-9D93-4F663481527A@comcast.net> Date: Mon, 16 Dec 2013 15:22:50 -0800 To: gcc-patches List Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-IsSubscribed: yes 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 #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);