From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26967 invoked by alias); 22 Feb 2006 10:51:21 -0000 Received: (qmail 26958 invoked by uid 22791); 22 Feb 2006 10:51:21 -0000 X-Spam-Check-By: sourceware.org Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.204) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Feb 2006 10:51:20 +0000 Received: by wproxy.gmail.com with SMTP id i3so88013wra for ; Wed, 22 Feb 2006 02:51:17 -0800 (PST) Received: by 10.54.133.4 with SMTP id g4mr430696wrd; Wed, 22 Feb 2006 02:51:17 -0800 (PST) Received: by 10.54.154.18 with HTTP; Wed, 22 Feb 2006 02:51:17 -0800 (PST) Message-ID: <84fc9c000602220251y3054e492v273a7f85b379b6cf@mail.gmail.com> Date: Wed, 22 Feb 2006 10:51:00 -0000 From: "Richard Guenther" To: "Mark Mitchell" Subject: Re: Bootstrap failure on trunk: x86_64-linux-gnu Cc: law@redhat.com, "Eric Botcazou" , "Arnaud Charlet" , "Richard Kenner" , gcc@gcc.gnu.org, "Andrew Pinski" , "Andrew Haley" In-Reply-To: <43FB9AAC.1030004@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <17400.42579.162536.967995@zapata.pink> <20060219171436.GA54960@adacore.com> <200602192015.13540.ebotcazou@adacore.com> <1140543353.2580.54.camel@localhost.localdomain> <43FB9AAC.1030004@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00519.txt.bz2 On 2/21/06, Mark Mitchell wrote: > Jeffrey A Law wrote: > > > My feeling? Absolutely, TYPE_MIN_VALUE and TYPE_MAX_VALUE should > > represent the set of values that an object of the type may hold. > > Any other definition effectively renders those values useless. > > I agree -- with the obvious caveat that it need not be the case that the > object actually have that value if the program has invoked undefined > behavior. So, if you have an 5-bit type, stored in a byte, and you > manage to get 255 in that byte, and you read the value, you might see > 255 at runtime -- but only because your program was busted anyhow. Right. And if Ada wants to test for this condition using 'Valid, it should= do the range comparison in the base type and use a VIEW_CONVERT_EXPR to get to the object of the base type from the 5-bit-type to avoid VRP optimizing away the comparison. Richard.