From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15195 invoked by alias); 29 Nov 2012 12:24:43 -0000 Received: (qmail 15114 invoked by uid 22791); 29 Nov 2012 12:24:38 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Nov 2012 12:24:33 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qATCOXRe014895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Nov 2012 07:24:33 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qATCOURF008275; Thu, 29 Nov 2012 07:24:32 -0500 Message-ID: <50B753FE.10809@redhat.com> Date: Thu, 29 Nov 2012 12:24:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Kai Tietz CC: GCC Patches , Jason Merrill Subject: Re: [patch c++]: 1 of 7 Fix for PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg02420.txt.bz2 On 11/29/2012 12:03 PM, Kai Tietz wrote: > Hello, > > this trivial patch fixes a bootstrap issue on LLP64 hosts. But it's trivial at the expense of truncating the pointer. Looking around, I'd think that something like casting to hwi (after uintptr_t), and then use HOST_WIDE_INT_PRINT_HEX as format would be the gcc way. > Index: cp/class.c > =================================================================== > --- cp/class.c (Revision 193925) > +++ cp/class.c (Arbeitskopie) > @@ -7817,7 +7817,7 @@ dump_class_hierarchy_r (FILE *stream, > indented = maybe_indent_hierarchy (stream, indent, 0); > fprintf (stream, "%s (0x%lx) ", > type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER), > - (unsigned long) binfo); > + (unsigned long) (uintptr_t) binfo); -- Pedro Alves