C-- Harvard EECS -> C-- Home -> C-- Downloads
  C-- Home | Specification & Downloads | Old News | Papers | Mailing List | People | FAQ

C-- Downloads

The C-- Specification

Quick C--

Front ends

Other compilers





C-- specification (Version 2)

The specification is available as DVI, PostScript, or PDF.

The Quick C-- compiler and interpreter

The C-- compiler under most active development is Quick C--. It includes an interpreter with run-time system and a native-code compiler that is more or less ready for prime time. The native-code compiler supports only the Intel x86 architectures; support for several other architectures, including PowerPC for Mac OS X, remains to be completed.

Get it from browsing the source code. If you don't like building things from source, you can also download a x86 Linux glibc6 binary. -->

Because Quick C-- does not support the full C-- specification (for example, it lacks support for 36-bit arithmetic), you must consult the release notes to find out what features are and are not supported. Which features we support when depends on users' requests.

Do read more about the Quick C-- compiler.

Front ends that emit C--

Paul Govereau has written a demonstration front end for Tiger. You can download the most recent tarball. For details see the instructions for our Rsync server.

We have adapted Fraser and Hanson's lcc compiler to emit C--, except that this compiler cannot compile varargs functions. (Calls to varargs functions are OK.) This work is not on our web site, but we are happy to share it with interested researchers.

Matthew Fluet has adapted the MLton optimizing compiler to emit C--, but as of April 2005, the MLton front end triggers a number of C-- compiler bugs, so this front end is not yet usable.


Lua-ML is an interpreter for version 2.5 of the Lua programming language. We use Lua-ML to configure and script the Quick C-- compiler. You can download the most recent tarball or browse for other tarballs. You may want to read papers about support for embedding and separate compilation.


Mk is Andrew Hume's reimplementation of make. Mk is recommended by Stu Feldman, who created make. Mk has evolved through many systems from Bell Labs. Mk does not try to do everything but instead provides small but coherent set of features, including especially good integration with the shell. We use it to build Quick C--, and we're very happy.

The C code for Mk is extracted from the Plan 9 source distribution and comes with an Open Source License. Requirements for compilation are a C compiler and Make. The documentation includes a PDF file about Mk, and a Unix man page.


When an Objective Caml bytecode program (prior version 3.07) dies with an uncaught exception, it can leave a stack trace for debugging. The stack trace mentions source code positions in modules, where each position is a character-offset from the beginning of the file. The OCamlError tools reads such a stack trace and annotates it with more readable (file, line, column) source code positions. It also honors CPP line directives that are useful when source code is created by tools like OCamlYacc or other preprocessors.

Starting with OCaml 3.07, stack traces refer to source code positions by file, line, and column directly. OCamlError is obsolete for such programs.

Requirements for compilation: Objective Caml 3.*, GNU Make, Perl. The source code is a literate program and comes with documentation in HTML format and a Unix-style manual page.


Burg is somewhat analagous to Yacc for tree grammars as opposed to string grammars. Like `Yacc', Burg can stand for an idea or a family of tools as well as a particular tool. A typical use is to use Burg to map an intermediate-code tree to a sequence of machine instructions. OCamlBurg is member of the Burg family and emits Objective Caml code. OCamlBurg is inspired by IBurg from Fraser, Hanson, and Proebsting. Their paper about IBurg includes an introduction to code generation with IBurg.

Requirements for compilation: Objective Caml 3.*, GNU Make, Perl. The source code is a literate program and comes with documentation in HTML format, a Unix-style manual page, and examples.

Other C-- compilers

Contact: C-- Webmaster. URL: http://www.cminusminus.org/. Last edited: Sat 11 Oct 2008 16:57 EDT.