From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31097 invoked by alias); 28 Jun 2005 20:24:45 -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 31088 invoked by uid 22791); 28 Jun 2005 20:24:41 -0000 Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 28 Jun 2005 20:24:41 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id C6C549641; Tue, 28 Jun 2005 16:24:39 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01642-01-2; Tue, 28 Jun 2005 16:24:39 -0400 (EDT) Received: from [127.0.0.1] (taconic.gnat.com [205.232.38.103]) by nile.gnat.com (Postfix) with ESMTP id 8D6D9960F; Tue, 28 Jun 2005 16:24:39 -0400 (EDT) Message-ID: <42C1B206.3000705@adacore.com> Date: Tue, 28 Jun 2005 20:24:00 -0000 From: Robert Dewar User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) MIME-Version: 1.0 To: Paul Koning CC: galibert@pobox.com, dave.korn@artimi.com, aph@redhat.com, gdr@integrable-solutions.net, pinskia@physics.uc.edu, gcc@gcc.gnu.org Subject: Re: signed is undefined and has been since 1992 (in GCC) References: <20050628171752.GE52889@dspnet.fr.eu.org> <20050628180203.GG52889@dspnet.fr.eu.org> <42C19C5A.2040705@adacore.com> <20050628191746.GJ52889@dspnet.fr.eu.org> <42C1A318.4040407@adacore.com> <17089.45177.781373.794318@gargle.gargle.HOWL> In-Reply-To: <17089.45177.781373.794318@gargle.gargle.HOWL> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-06/txt/msg01194.txt.bz2 Paul Koning wrote: > And also because most people believe that C applies normal computer > arithmetic, and they believe that normal computer arithmetic is > wrapped 2's complement. (And indeed it usually is, give or take some > bizarre exceptions like MAX_INT % -1) and not so bizarre exceptions like machines that trap on signed overflow. > > We all know better, but how tiny is the fraction of C programmers who > have ever even *seen* the ANSI C spec, much less know in detail what > it says? OK, but to me "knows C" (the predicate in my statement) certainly means being familiar with the standard, not necessarily by reading it, I am sure there are lots of good books on C that have a good account of the rules (K&R is clear enough on this particular issue).