From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8556 invoked by alias); 14 Jul 2005 01:59:50 -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 8480 invoked by uid 22791); 14 Jul 2005 01:59:46 -0000 Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 14 Jul 2005 01:59:46 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 959529609; Wed, 13 Jul 2005 21:59:44 -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 05549-01-9; Wed, 13 Jul 2005 21:59:44 -0400 (EDT) Received: from [127.0.0.1] (taconic.gnat.com [205.232.38.103]) by nile.gnat.com (Postfix) with ESMTP id 512179660; Wed, 13 Jul 2005 21:59:44 -0400 (EDT) Message-ID: <42D5C70F.5060109@adacore.com> Date: Thu, 14 Jul 2005 01:59:00 -0000 From: Robert Dewar User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) MIME-Version: 1.0 To: Paul Schlie CC: GCC Development Subject: Re: Where does the C standard describe overflow of signed integers? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-07/txt/msg00576.txt.bz2 Paul Schlie wrote: > Although I don't intend to extend the debate; doesn't anyone find it curious > that given this hard requirement, combined with the fact that all current > machine architectures rely on 2's complement signed integer representation > to eliminate the otherwise necessity for distinct signed integer arithmetic > operations; that by extension unsigned and signed integer arithmetic > operations are behaviorally equivalent all current machine implementations > (as well as likely future implementations for the same reasons); nonsense! -1/1 = 0 signed, -1 unsigned -1 < 1 signed, -1>1 unsigned