From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21479 invoked by alias); 11 Jul 2005 15:07:16 -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 20991 invoked by uid 22791); 11 Jul 2005 15:07:11 -0000 Received: from host217-40-213-68.in-addr.btopenworld.com (HELO SERRANO.CAM.ARTIMI.COM) (217.40.213.68) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 11 Jul 2005 15:07:11 +0000 Received: from mace ([192.168.1.25]) by SERRANO.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.211); Mon, 11 Jul 2005 16:07:08 +0100 From: "Dave Korn" To: "'Nicholas Nethercote'" , Subject: RE: Where does the C standard describe overflow of signed integers? Date: Mon, 11 Jul 2005 15:07:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: Message-ID: X-SW-Source: 2005-07/txt/msg00414.txt.bz2 ----Original Message---- >From: Nicholas Nethercote >Sent: 11 July 2005 15:59 > Hi, > > There was recently a very long thread about the overflow behaviour of > signed integers in C. Apparently this is undefined according to the C > standard. I searched the standard on this matter, and while I did find > some paragraphs that described how unsigned integers must wrap around upon > overflow, I couldn't find anything explicit about signed integers. Anything not defined is undefined, by definition! > Can someone point me to the relevant part(s) of the standard? :) I can only point you at the whole thing, where it doesn't define it anywhere. See also 3.4.3/3, and H.2.2. cheers, DaveK -- Can't think of a witty .sigline today....