From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6360 invoked by alias); 28 Jun 2005 17:51:09 -0000 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 Received: (qmail 5714 invoked by uid 22791); 28 Jun 2005 17:50:42 -0000 Received: from us02smtp1.synopsys.com (HELO vaxjo.synopsys.com) (198.182.60.75) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 28 Jun 2005 17:50:42 +0000 Received: from mother.synopsys.com (mother.synopsys.com [146.225.100.171]) by vaxjo.synopsys.com (Postfix) with ESMTP id A244FDC60; Tue, 28 Jun 2005 10:50:40 -0700 (PDT) Received: from piper.synopsys.com (localhost [127.0.0.1]) by mother.synopsys.com (8.9.1/8.9.1) with ESMTP id KAA25366; Tue, 28 Jun 2005 10:50:40 -0700 (PDT) Received: from piper.synopsys.com (localhost [127.0.0.1]) by piper.synopsys.com (8.12.10/8.12.3) with ESMTP id j5SHodOe009833; Tue, 28 Jun 2005 10:50:39 -0700 Received: (from jbuck@localhost) by piper.synopsys.com (8.12.10/8.12.10/Submit) id j5SHodNI009831; Tue, 28 Jun 2005 10:50:39 -0700 Date: Tue, 28 Jun 2005 17:51:00 -0000 From: Joe Buck To: Olivier Galibert Cc: Andrew Haley , Dave Korn , "'Robert Dewar'" , "'Gabriel Dos Reis'" , "'Andrew Pinski'" , "'gcc mailing list'" Subject: Re: signed is undefined and has been since 1992 (in GCC) Message-ID: <20050628175039.GB9783@synopsys.com> References: <20050628142441.GA52889@dspnet.fr.eu.org> <20050628145148.GD52889@dspnet.fr.eu.org> <17089.26325.169281.749633@zapata.pink> <20050628171752.GE52889@dspnet.fr.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050628171752.GE52889@dspnet.fr.eu.org> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-06/txt/msg01161.txt.bz2 On Tue, Jun 28, 2005 at 07:17:52PM +0200, Olivier Galibert wrote: > On Tue, Jun 28, 2005 at 04:03:49PM +0100, Andrew Haley wrote: > > This is childish and insulting. > > Calling a large part of the programs out there, including a non > negligible subpart of what I personally write either "blatantly buggy" > or "subtly-incorrect" is somewhat childish and insulting. I agree, partly, with Olivier. However, let's not insult each other; we need to recognize that GCC developers have to worry about embedded systems, where some of the assumptions Olivier makes do not hold. I make some of the same tradeoffs in my code as Olivier does, because the assumptions are true of all of the target platforms we care about. (In particular, either ILP32 or LP64, with IEEE FP arithmetic; for everything else we need rigorous type safety, unions if pointers share storage with longs, etc). However, I am careful to document them, and disagree with a couple (particularly assuming things about unaligned access; even when the architecture permits it, there's a substantial speed penalty). Also, some of Olivier's assumptions could lead to less maintainable code; sloppy typing can hide errors, even for assumptions that are safe with all ILP32 and LP64 machines with IEEE FP. However: > And probably some others I'm forgetting. Thinking that programs which > rely on these assumptions are incorrect is the attitude of a theorist > with his head in the sand. It would be best to say that the assumptions are non-portable, too non-portable to be used in code contributed to GCC.