From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30011 invoked by alias); 27 Jun 2005 14:39:44 -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 29988 invoked by uid 22791); 27 Jun 2005 14:39:38 -0000 Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.192) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 27 Jun 2005 14:39:38 +0000 Received: by rproxy.gmail.com with SMTP id f1so1560122rne for ; Mon, 27 Jun 2005 07:39:36 -0700 (PDT) Received: by 10.38.86.8 with SMTP id j8mr1040004rnb; Mon, 27 Jun 2005 07:39:36 -0700 (PDT) Received: by 10.38.76.22 with HTTP; Mon, 27 Jun 2005 07:39:36 -0700 (PDT) Message-ID: <118833cc050627073918793062@mail.gmail.com> Date: Mon, 27 Jun 2005 14:39:00 -0000 From: Morten Welinder Reply-To: Morten Welinder To: gcc@gcc.gnu.org Subject: Re: Do C++ signed types have modulo semantics? Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-SW-Source: 2005-06/txt/msg01051.txt.bz2 | signed types are undefined on overflow. [5/5] and [3.9.1/2,3] > But a compiler could define them to be modulo -- that is the whole > point. The paragraph does not say they don't "modulo". True, but you are going to have to deal with the run-time version of (int)0x80000000 / -1 which is unpleasant in the sense that Intel processors will trap and not do anything modulo-like. Morten