From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16210 invoked by alias); 3 Jul 2005 00:13:37 -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 16189 invoked by uid 22791); 3 Jul 2005 00:13:32 -0000 Received: from smtp-100-sunday.noc.nerim.net (HELO mallaury.nerim.net) (62.4.17.100) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 03 Jul 2005 00:13:32 +0000 Received: from uniton.integrable-solutions.net (gdr.net1.nerim.net [62.212.99.186]) by mallaury.nerim.net (Postfix) with ESMTP id A968A4F393; Sun, 3 Jul 2005 02:13:29 +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 j630CWKY026615; Sun, 3 Jul 2005 02:12:32 +0200 Received: (from gdr@localhost) by uniton.integrable-solutions.net (8.12.10/8.12.10/Submit) id j630CWmF026614; Sun, 3 Jul 2005 02:12:32 +0200 To: Robert Dewar Cc: Florian Weimer , 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> <42C72101.4020604@adacore.com> From: Gabriel Dos Reis In-Reply-To: <42C72101.4020604@adacore.com> Date: Sun, 03 Jul 2005 00:13:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-07/txt/msg00079.txt.bz2 Robert Dewar writes: | Florian Weimer wrote: | | > 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 | > behavior. IIRC, I needed quite some time to realize the full impact | > of this distinction. | | Note that even making things implementation defined does not help the | problem of learning by example from one implementation. It really is | a good idea for people programming in language X to learn language X :-) Then, one wonders why the GNAT is not bug free ;-p | Back in the days of Algol-60 absolutely everyone read the report. Then | we went through an era of standards which few people read (how many | fortran programmers read the fortran standard, cobol programmers | read the cobol standard, c programmers read the c standard etc). A | rather nice achievment with Ada is that the standard is indeed a | reference book that all Ada programmers have on their shelf and | even though not all have read it through, they know it is the oh, so it suffices to have it? Not to understand it? | important ultimate reference standard of what is and what is not | allowed in valid programs, and you would be hard put to find a | professional Ada programmer who has not frequently reached for | the standard to look something up. In a big class of programmers | nearly all of whom had done professional C programming a couple | of years ago, only 2 out of 94 had held the C standard in their | hands. | | It's not an easy document, but it's also not that hard, it would | be nice to promote its use more! The issue is whether they need to become expect in red herring or just know how to write good and correct programs. Interestingly, backis the old days K&R put emphasis on how to write good and useful programs rather than academic exercise in "undefined behaviour". -- Gaby