[Top][All Lists]

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

[Tinycc-devel] Re: Any hope for small c++ compiler

From: Mitchell N Charity
Subject: [Tinycc-devel] Re: Any hope for small c++ compiler
Date: Thu, 12 Dec 2002 00:41:37 -0500

   Any hope for small c++ compiler

No.  By definition, because C++ is not a small language.

   Is it better to go for a cfront type precompiler and run that through 
   tcc or just implement a native tc++ compiler from scratch?

Complexity and performance are similar.  Non-trivial C++ to C
conversion requires a C++ compiler, which just happens to emit C code
rather than object code.  Be advised, writing a C++ compiler is much
harder than writing a C compiler, and is a _many_ person year project.
Having tcc... helps you very little.

I know of no open source C++ to C translators.  Comeau has a commercial
one.  I have no idea how fast it is.  It is picky about its C compiler
back ends, so using tcc would require effort. http://www.comeaucomputing.com

Note the existence of ccache, http://ccache.samba.org/ , which speeds
C/C++ compilation... by avoiding it.  There is also the older script-
based compilercache.

In a similar vein, you might gain some leverage with improved dependency
analysis.  Ie, there is no need to recompile a file if the specific code
changed in a header is not actually used by the file.  There are
assorted C++ source code analysis tools which might help.  I have no
idea what work has been done on this previously.  Practically, you might
start with ccache, and if you are still "desperate", see if significant
unnecessary compiles are occurring, and then if any significant subset
of them can be easily recognized, and thus avoided.

Mitchell Charity

reply via email to

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