From owner-freebsd-current@FreeBSD.ORG Sat Jan 10 18:34:28 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 036A21065673 for ; Sat, 10 Jan 2009 18:34:28 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 55DF88FC36 for ; Sat, 10 Jan 2009 18:34:27 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 10 Jan 2009 18:34:25 -0000 Received: from p54A3D14A.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.209.74] by mail.gmx.net (mp013) with SMTP; 10 Jan 2009 19:34:25 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX18aHMc+hLgadBOw5yjicHSSNwL+DS0oO4wMz5OPCr 8Hiay/2zCDVo7X Message-ID: <4968EA30.4010608@gmx.de> Date: Sat, 10 Jan 2009 19:34:24 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Roman Divacky References: <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> <3cb459ed0901091412o5861ec59web9b48d264ca053b@mail.gmail.com> <20090109222211.GA33145@freebsd.org> <3cb459ed0901091453i2144419fyede5894ae411a259@mail.gmail.com> <20090109230252.GA37323@freebsd.org> In-Reply-To: <20090109230252.GA37323@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53 Cc: Andrew Reilly , freebsd-current@freebsd.org, Alexander Churanov , 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: Sat, 10 Jan 2009 18:34:28 -0000 Roman Divacky schrieb: > On Sat, Jan 10, 2009 at 01:53:56AM +0300, Alexander Churanov wrote: >> Roman, >> >>> clang (clang.llvm.org) supports almost everything now and aims for full >>> C99 >>> support. >>> >>> pcc aims for full C99 too I believe >>> >>> Chris Mallon can comment better but I believe cparser is C99 too >>> >>> am I missing something? >>> >> This means that I am missing something and that '-pedantic' is all the more >> important. > > well.... > > clang DEFINITELY aims to be drop-in replacement for gcc, ie. it supports (aims > to support) all the gcc extensions hence no -pedantic needed to be compatible > with gcc and clang at the same time > > pcc discusses this now (http://pcc.ludd.ltu.se/jira/browse/PCC-18) > > from what Chris Mallon said I believe it's cparser's goal too to be drop-in > replacement for gcc cparser supports GCC specific command line switches and language extensions. The most important GCC extensions are its inline assembler syntax, attributes (though only some of them, there are so many...), statement expressions (i.e. ({}), not to be confused with expression statements), thread local variables. We are adding command line switches when needed, because there are hundrends. The most important ones are already supported and the next release will support more. But making a drop-in replacement is not that easy, because sometimes people depend on specific GCC behaviour, which is just happens by coincidence. For example the first larger project (aside from SPEC2000), which we compiled with cparser, was ioquake3. It contains some inline assembler statements. The input/output parameter specification of them was wrong, but GCC accidently produced working code. cparser/libFIRM generated code, which was correct according to the specification, but did not work. So when you change the compiler and even if the compiler does everything right, things still might break, because the input was faulty and you just didn't notice so far. I resolved this specific problem by sending a patch to the ioquake3 maintainer. (: What I want to express is that you have to work very thoroughly when changing the compiler of such a large project especially because it also contains many hardware depedent parts.