From patchwork Wed Apr 4 14:50:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 150747 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]) by ozlabs.org (Postfix) with SMTP id 4EA38B6FBC for ; Thu, 5 Apr 2012 00:50:32 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1334155833; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Subject:Mime-Version:Content-Type:From:In-Reply-To:Date: Cc:Content-Transfer-Encoding:Message-Id:References:To: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=VKJMdRBWSZIFM600VuyI GVAM3Co=; b=nnfW+gqdGKTM8puLXTs9EL6LVjJvJEIRkPqAzYz2nJ51dV4Dphwk pl7RQAJYir5aG8qYXcKoaqkhCRxDJA9EntZfenBZ15ARm+90c9zTooSXdKAyVNBj qq+ddv0UmFERsyEYqNl3IpSb1G8UQt9/acD9LTpuAE8ooUbR208xdhI= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=k+k2VWOHPes+GaJImMGJANf9oVMjIHosmQP32Uxslyv/je/dX3UEfFrcU5pWNE MwRTeFJRf7BhDkm5W4PtOZTiNV2jtPYu5/tIf2hUqNuaCru6bYt/TNUDHMEpxPSY hSj29baDwjSYeOiIFBxuYFt5s8sN5M+MF8qzWgDQWWuGc=; Received: (qmail 12246 invoked by alias); 4 Apr 2012 14:50:27 -0000 Received: (qmail 12238 invoked by uid 22791); 4 Apr 2012 14:50:25 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Apr 2012 14:50:13 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id E86A429002D; Wed, 4 Apr 2012 16:50:16 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4pagyi6eFgWe; Wed, 4 Apr 2012 16:50:16 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id D6E39290021; Wed, 4 Apr 2012 16:50:16 +0200 (CEST) Subject: Re: [Libiberty]: Handle VMS as a LLP64 platform in splay-tree.h Mime-Version: 1.0 (Apple Message framework v1257) From: Tristan Gingold In-Reply-To: Date: Wed, 4 Apr 2012 16:50:11 +0200 Cc: GCC Patches Message-Id: References: <991EB52A-1080-4EED-8D17-2E73BF8050A0@adacore.com> To: Ian Lance Taylor X-IsSubscribed: yes 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 On Apr 4, 2012, at 3:58 PM, Ian Lance Taylor wrote: > Tristan Gingold writes: > >> include/ >> 2012-04-04 Tristan Gingold >> >> * splay-tree.h: Use LLP64 definitions of libi_shostptr_t and >> libi_hostptr_t for VMS with 64bit pointers. > > I was strongly opposed to adding a _WIN64 define here and this is just > making it worse. Understood. Would something like that be acceptable ? I have just checked that I can still build gcc with that patch. If you like this approach I will properly submit a patch. Tristan. --- a/include/splay-tree.h +++ b/include/splay-tree.h @@ -37,18 +37,11 @@ extern "C" { #include "ansidecl.h" -#ifndef _WIN64 - typedef unsigned long int libi_uhostptr_t; - typedef long int libi_shostptr_t; -#else -#ifdef __GNUC__ - __extension__ +#ifdef HAVE_STDINT_H +#include #endif - typedef unsigned long long libi_uhostptr_t; -#ifdef __GNUC__ - __extension__ -#endif - typedef long long libi_shostptr_t; +#ifdef HAVE_INTTYPES_H +#include #endif #ifndef GTY @@ -59,8 +52,8 @@ extern "C" { these types, if necessary. These types should be sufficiently wide that any pointer or scalar can be cast to these types, and then cast back, without loss of precision. */ -typedef libi_uhostptr_t splay_tree_key; -typedef libi_uhostptr_t splay_tree_value; +typedef uintptr_t splay_tree_key; +typedef uintptr_t splay_tree_value; /* Forward declaration for a node in the tree. */ typedef struct splay_tree_node_s *splay_tree_node; index 7450eeb..fa45392 100644 --- a/gcc/gengtype.c +++ b/gcc/gengtype.c @@ -4976,6 +4976,7 @@ main (int argc, char **argv) POS_HERE (do_scalar_typedef ("double_int", &pos)); POS_HERE (do_scalar_typedef ("uint64_t", &pos)); POS_HERE (do_scalar_typedef ("uint8", &pos)); + POS_HERE (do_scalar_typedef ("uintptr_t", &pos)); POS_HERE (do_scalar_typedef ("jword", &pos)); POS_HERE (do_scalar_typedef ("JCF_u2", &pos)); POS_HERE (do_scalar_typedef ("void", &pos));