tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] what are tcc's limitations?


From: Rob Landley
Subject: Re: [Tinycc-devel] what are tcc's limitations?
Date: Sun, 15 Oct 2006 01:19:44 -0400
User-agent: KMail/1.9.1

On Friday 13 October 2006 3:16 pm, Bernhard Fischer wrote:
> On Sun, Oct 15, 2006 at 02:02:57AM +0800, bj wrote:
> >so TinyCC is small,quick,dirty, and a good translator?
> >
> >i didn't understand what you meant by these statements:
> 
> 1) Fix your time
> 2) tcc has no noteworthy code optimizations. It's main purpose is it's
> size, not necessarily the quality (speed/size) of the generated code.

Don't forget speed.  The compiler is small, the compiler is simple, and the 
compiler runs very very fast.  This doesn't mean that the code the compiler 
produces does any of those things.

> 3) tcc is a C89 compiler, for the most part. Anyone who thinks he's able
> to compile e.g. the kernel or other SW that peruses certain C99 features
> is likely to be surprised.

Says who?  According to the docs it's missing complex/imaginary numbers, and 
variable length arrays.

http://fabrice.bellard.free.fr/tcc/tcc-doc.html#SEC7

Adding variable length arrays is important.  I don't personally care about 
complex numbers.  What else is missing?

> That said, even if the majority of C89 is 
> supported currently, there are a couple of loose ends even with C89.

Such as?

It has _bugs_, but C89 claims to be feature-complete.

http://fabrice.bellard.free.fr/tcc/tcc-doc.html#SEC6

> >Nobody wants to use GCC with -O0 instead of -O2, but this is what you get
> >from TinyCC
> 
> As said, tcc doesn't optimize, i.e. it behaves roughly like -O0

Again, the documentation says this isn't entirely true:
http://fabrice.bellard.free.fr/tcc/tcc-doc.html#SEC35

I'm still reading the code, and expect to be for some time.  (And then I plan 
to spend some time untangling it so it's easier to read...)

> >When GCC is a good human translator, TinyCC is babelfish.altavista.com
> 
> tcc generates suboptimal code, size wise as well as performance wise as
> it's main goal is it's _own_ size as opposed to _creating_ small obj.

It seems to me that its main goal has been to be really fast for about a year 
and a half now, so the -run mode is a viable scripting language.

Rob
-- 
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery




reply via email to

[Prev in Thread] Current Thread [Next in Thread]