From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6401 invoked by alias); 9 Jun 2011 14:58:22 -0000 Received: (qmail 6391 invoked by uid 22791); 9 Jun 2011 14:58:21 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jun 2011 14:58:05 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 3A21E94109; Thu, 9 Jun 2011 16:58:04 +0200 (CEST) Date: Thu, 09 Jun 2011 15:56:00 -0000 From: Richard Guenther To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Remove set_sizetype In-Reply-To: Message-ID: References: <201106091437.13820.ebotcazou@adacore.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 2011-06/txt/msg00741.txt.bz2 On Thu, 9 Jun 2011, Richard Guenther wrote: > On Thu, 9 Jun 2011, Eric Botcazou wrote: > > > > Now that there is a single place left to call set_sizetype we can > > > remove it and initialize sizetypes properly from the start > > > (in initialize_sizetypes). > > > > Can you give a meaningful TYPE_NAME to sizetype? Ada dump files now read: > > > > _GLOBAL.SZ0_discr31 (integer p0, integer p1) > > { > > return p1 <= p0 ? ((bitsizetype) (() p0 - > > () p1) + 1) * 8 : 0; > > } > > > > and this isn't very pretty. > > It's on my todo - I need to fixup FEs to not expect a TYPE_DECL > everywhere. Like this, testing with the C family fixup. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2011-06-09 Richard Guenther * stor-layout.c (initialize_sizetypes): Give names to all sizetype kinds. Index: gcc/stor-layout.c =================================================================== --- gcc/stor-layout.c (revision 174841) +++ gcc/stor-layout.c (working copy) @@ -2215,8 +2215,7 @@ initialize_sizetypes (void) /* Create stubs for sizetype and bitsizetype so we can create constants. */ sizetype = make_node (INTEGER_TYPE); - /* ??? We can't set a name for sizetype because it appears in C diagnostics - and pp_c_type_specifier doesn't deal with IDENTIFIER_NODE TYPE_NAMEs. */ + TYPE_NAME (sizetype) = get_identifier ("sizetype"); TYPE_PRECISION (sizetype) = precision; TYPE_UNSIGNED (sizetype) = 1; TYPE_IS_SIZETYPE (sizetype) = 1; @@ -2250,8 +2249,10 @@ initialize_sizetypes (void) /* Create the signed variants of *sizetype. */ ssizetype = make_signed_type (TYPE_PRECISION (sizetype)); + TYPE_NAME (ssizetype) = get_identifier ("ssizetype"); TYPE_IS_SIZETYPE (ssizetype) = 1; sbitsizetype = make_signed_type (TYPE_PRECISION (bitsizetype)); + TYPE_NAME (sbitsizetype) = get_identifier ("sbitsizetype"); TYPE_IS_SIZETYPE (sbitsizetype) = 1; }