gcc 4.3: when will it become standard compiler?
Christoph Mallon
christoph.mallon at gmx.de
Sat Jan 10 10:34:28 PST 2009
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.
More information about the freebsd-current
mailing list