tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] RE : Speed of development of a compiler.


From: Edmund Grimley Evans
Subject: Re: [Tinycc-devel] RE : Speed of development of a compiler.
Date: Tue, 24 Nov 2015 23:11:58 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Christian JULLIEN <address@hidden>:

> While tcc is a very nice compiler we all love, it is not full ISO compliant
> (any version you choose). They are few to many corner cases not fully
> implemented

Do you have any interesting examples of that?

I expect that TCC is full of bugs caused by something like "corner
cases" in the implementation. Comments like the following do not
inspire confidence:

                /* Allocate second register. Here we rely on the fact that
                   get_reg() tries first to free r2 of an SValue. */

In general, there's no clear modularisation or semantics of the
internal representation so it's easy to imagine that a certain
register getting spilled at a certain point in the processing of a
certain language construct might cause it to go wrong.

But you seem to be referring to something different from plain
ordinary bugs, perhaps things more like what my recent commit 30c54c9
was supposed to fix, or Debian bug #770657, which sounds more like an
oversight or design error rather than just a bug.

> and it relies on gcc for a large part of its library.

It's traditional to be obsessed with "self-hosting" but perhaps it's
healthier not to worry too much about that. Clang/LLVM wasn't able to
compile itself until it was about ten years old. Now that GHC uses
LLVM for its back-end, GHC is in effect a Haskell compiler implemented
in a mixture of Haskell and C++.

Edmund



reply via email to

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