From owner-freebsd-current@FreeBSD.ORG Fri Jan 9 14:33:52 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB24F1065670 for ; Fri, 9 Jan 2009 14:33:52 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id A2BC58FC14 for ; Fri, 9 Jan 2009 14:33:52 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 8B46F9CB1A1; Fri, 9 Jan 2009 15:33:42 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JsZSqzKfpML9; Fri, 9 Jan 2009 15:33:40 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 42A3F9CB298; Fri, 9 Jan 2009 15:33:40 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id n09EXdsC046175; Fri, 9 Jan 2009 15:33:39 +0100 (CET) (envelope-from rdivacky) Date: Fri, 9 Jan 2009 15:33:39 +0100 From: Roman Divacky To: Christoph Mallon Message-ID: <20090109143339.GA45569@freebsd.org> References: <49668763.8020705@mail.zedat.fu-berlin.de> <20090108233311.GA69883@keltia.freenix.fr> <20090109031147.GB44317@duncan.reilly.home> <49672189.5060109@gmx.de> <20090109110508.GA12123@freebsd.org> <496751D1.20605@gmx.de> <20090109134725.GA38233@freebsd.org> <49675F04.20006@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49675F04.20006@gmx.de> User-Agent: Mutt/1.4.2.3i Cc: Andrew Reilly , freebsd-current@freebsd.org, Ollivier Robert Subject: Re: gcc 4.3: when will it become standard compiler? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 14:33:53 -0000 On Fri, Jan 09, 2009 at 03:28:20PM +0100, Christoph Mallon wrote: > Roman Divacky schrieb: > >On Fri, Jan 09, 2009 at 02:32:01PM +0100, Christoph Mallon wrote: > >>Roman Divacky schrieb: > >>>>I'm not saying it's wrong to look for alternatives, but you cannot just > >>>>change your system compiler like you change underwear. > >>>well... the first step is imho starting to compile world with C99... > >>>that might reveal some bugs, note that as of a few months ago > >>>8-current compiles cleanly with C99, that does not mean that it's > >>>working when you run those programs correctly :) > >>One step in the right direction is embracing the nice features modern C > >>offers you. For example declaring a variable right were you need it > >>instead of dozens of lines away is one such nice thing which improves > >>readability. Designated initializers improve readability, too. > >>But I'm not exactly sure what you mean by "compile world with C99". C99 > >>is pretty much backwards compatible to C89. > > > >sorry for the bad wording - I meant to turn C99 compilation on default. > >We compile in gnu89 mode now. > > I still have no idea what you mean. Sure, you can specify -std=c99 (or > more likely gnu99), but an int is still an int - what do you expect? In > fact default mode of GCC accepts many C99 constructs like // comments > and mixed declarations and code, which are not valid C89. for example __restricted is C99 thing and there are others, I want this because clang for example defaults to C99 (in fact gnu99 as they support gnu extensions on default). By switching to default compilation in C99 mode we can be sure we stay compatible with clang and others.... for example opensolaris seems to use C99 features which are not enabled in our world because of this (I found same assert() related stuff) etc. plus other benefits of the newer languge standard