From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9054 invoked by alias); 2 Jul 2005 18:59:30 -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 9042 invoked by uid 22791); 2 Jul 2005 18:59:27 -0000 Received: from smtp-106-saturday.nerim.net (HELO kraid.nerim.net) (62.4.16.106) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 02 Jul 2005 18:59:27 +0000 Received: from uniton.integrable-solutions.net (gdr.net1.nerim.net [62.212.99.186]) by kraid.nerim.net (Postfix) with ESMTP id 217EC40E20; Sat, 2 Jul 2005 20:59:24 +0200 (CEST) Received: from uniton.integrable-solutions.net (localhost [127.0.0.1]) by uniton.integrable-solutions.net (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j62IwSKY025624; Sat, 2 Jul 2005 20:58:29 +0200 Received: (from gdr@localhost) by uniton.integrable-solutions.net (8.12.10/8.12.10/Submit) id j62IwSUu025623; Sat, 2 Jul 2005 20:58:28 +0200 To: Florian Weimer Cc: Robert Dewar , Olivier Galibert , Dave Korn , "'Andrew Haley'" , "'Andrew Pinski'" , "'gcc mailing list'" 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> <8764vt2kq3.fsf@deneb.enyo.de> From: Gabriel Dos Reis In-Reply-To: <8764vt2kq3.fsf@deneb.enyo.de> Date: Sat, 02 Jul 2005 18:59:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-07/txt/msg00071.txt.bz2 Florian Weimer writes: | * Robert Dewar: | | > I am puzzled, why would *ANYONE* who knows C use int | > rather than unsigned if they want wrap around semantics? | | Both OpenSSL and Apache programmers did this, in carefully reviewed | code which was written in response to a security report. They simply | didn't know that there is a potential problem. The reason for this | gap in knowledge isn't quite clear to me. | | Probably it's hard to accept for hard-code C coders that a program | which generates correct machine code with all GCC versions released so | far (modulo bugs in GCC) can still be illegal C and exhibit undefined We need to be careful not to to substitute "illegal" for "undefined behaviour". GCC is not a court. Part from that, I maintain that we should not apply "undfeined behaviour" whole sale. -- Gaby