gcc 4.3: when will it become standard compiler?

Christoph Mallon christoph.mallon at gmx.de
Fri Jan 9 05:32:06 PST 2009


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.

>> PCC cannot seriously be considered. Its design is stuck in the 
>> seventies. From the point of view of compiler construction it is plain 
>> plain out of question. I especially was amused by the statement of the 
>> author who claimed PCC supports SSA - except for phi-functions.
> 
> what's wrong with design stuck in 70's when it compiles the whole world/kernel?
> 
> I would not use it for default compilation of releases but it might be
> useful when you are developing - because of its fast compilation times

If you want a real speed devil, try TCC.

> btw.. are you sure the design is stuck in the 70's? the author claims
> to have rewritten almost the whole thing. have you looked at the recent
> code?

It's still a simple tree based approach. From point of view of 
optimisations this often gets in the way. For example you need temporary 
variables as helper construct which just complicates things (yes, there 
are intermediate representations which do not have temporary variables 
at all). Much has happend in compiler land in the last 30 years. Now we 
have stuff like SSA and some are even doing code generation in this 
form. I can go into more details, but this is not the right place.

> another question - how is libfirm/cparser? last time I tried it didnt
> support much of the gcc options (-Wsomething -f-something etc.) so
> it could not be used as a direct drop-in

The next release will support several more switches for GCC 
compatibility. Here's the latest manpage: 
http://tron.homeunix.org/cparser.1 - you can view it with "nroff -man 
cparser.1". Switches like -Wl, and -Wp, are supported. Many bugs have 
been resolved. More warning options have been added - many similar to 
what GCC does, some doing a better job. We plan to make a new release 
Really Soon Now(TM).


More information about the freebsd-current mailing list