Re: gcc 4.3: when will it become standard compiler?

From: Christoph Mallon <christoph.mallon_at_gmx.de>
Date: Sat, 10 Jan 2009 19:34:24 +0100
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.
Received on Sat Jan 10 2009 - 17:34:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:40 UTC