From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30749 invoked by alias); 15 Jun 2012 21:46:43 -0000 Received: (qmail 30741 invoked by uid 22791); 15 Jun 2012 21:46:41 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jun 2012 21:46:25 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1SfeLX-0004Rq-T8 from joseph_myers@mentor.com ; Fri, 15 Jun 2012 14:46:24 -0700 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 15 Jun 2012 22:46:22 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1SfeLV-0004vl-07; Fri, 15 Jun 2012 21:46:21 +0000 Date: Fri, 15 Jun 2012 22:07:00 -0000 From: "Joseph S. Myers" To: Mike Stump cc: Eric Botcazou , Tom Tromey , Pedro Alves , gcc-patches@gcc.gnu.org, Tristan Gingold , Richard Henderson , Jay K Subject: Re: long long availability in host compiler (Re: constant that doesn't fit in 32bits in alpha.c) In-Reply-To: <037FBC27-6514-42A3-A13B-7487560626E5@comcast.net> Message-ID: References: <201206152053.31356.ebotcazou@adacore.com> <87aa04s80v.fsf@fleche.redhat.com> <201206152211.57547.ebotcazou@adacore.com> <037FBC27-6514-42A3-A13B-7487560626E5@comcast.net> 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: 2012-06/txt/msg01090.txt.bz2 On Fri, 15 Jun 2012, Mike Stump wrote: > Yes, but why abstract the host? HOST_NARROW_INT is a nice way to HOST_WIDE_INT is an abstraction about the *target*; the target determines the required properties. The salient properties include: * At least as wide as target address space. * Constants for the target can be represented in at most two HOST_WIDE_INT. (This one is why some 32-bit targets require 64-bit HOST_WIDE_INT.) I describe at what I think are and are not appropriate uses of HOST_WIDE_INT. Yes, target_int / target_uint might be better names for this type as I think it should be used. Even if "long long" has the required properties, use of a type name such as target_int serves as documentation for the human reader about the intent of an entity in GCC - that it is an integer or size existing in some way on the target - and code needs to address the human reader, not just the compiler compiling it. -- Joseph S. Myers joseph@codesourcery.com