From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27188 invoked by alias); 21 Dec 2012 09:48:15 -0000 Received: (qmail 27169 invoked by uid 22791); 21 Dec 2012 09:48:14 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_20,DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-we0-f169.google.com (HELO mail-we0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Dec 2012 09:48:07 +0000 Received: by mail-we0-f169.google.com with SMTP id t49so2095264wey.14 for ; Fri, 21 Dec 2012 01:48:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.122.98 with SMTP id lr2mr22363437wjb.55.1356083286145; Fri, 21 Dec 2012 01:48:06 -0800 (PST) Received: by 10.216.153.132 with HTTP; Fri, 21 Dec 2012 01:48:06 -0800 (PST) In-Reply-To: <50D42E31.30807@oracle.com> References: <50D42823.9030601@oracle.com> <50D42CAB.4090704@oracle.com> <50D42E31.30807@oracle.com> Date: Fri, 21 Dec 2012 09:48:00 -0000 Message-ID: Subject: Re: [patch libstdc++]: Fix LLP64 pointer-size issues for cxxabi, eh_alloc, and hash_bytes From: Kai Tietz To: Paolo Carlini Cc: GCC Patches , "libstdc++" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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-12/txt/msg01293.txt.bz2 2012/12/21 Paolo Carlini : > On 12/21/2012 10:36 AM, Kai Tietz wrote: >> >> well, issue isn't that 'long' is always 'ptrdiff_t'. > > But then, if we just change the type without paying attention to size (and > alignment) aren't we looking for BIG ABI trouble?!? Huh? We have ABI-trouble due long is too small to hold a pointer-diff for llp64. Intended is here 'pointer-size' AFAICS in code, but with wrong assumption that a 'long' is always long enough. Btw I just checked all targets we have right now in gcc. The type ptrdiff_t is always either 'long', or 'int' (ilp32, lp64), and 'long long' for LLP64. Means ptrdiff_t gets always equal (or bigger) to biggest pointer-size for target (AFAICS). Kai