Nils Weller's C compiler

introduction

nwcc is a small C compiler for Unix systems that I wrote in my freetime, for fun and to prove to myself that I could. I started the project in August 2003, but because I had a job and a life and a few other hobby code projects, it took me until autumn 2005 to make it work with various constructs of the C language.

So what new things does nwcc bring to the table? Most importantly, new code: I wrote everything from scratch - including the lexer, parser and backend.

The code is written in C, is currently around 60.000 lines in size, and I'm releasing it under the BSD license. It works with Linux/FreeBSD/OpenBSD/Solaris on 80x86, Linux/FreeBSD/OpenBSD on AMD64, Solaris/Linux on SPARC, AIX on PowerPC, and IRIX on MIPS hardware. Cross-compilation and PIC code for shared libraries are also supported.

The current release is not intended for serious use, but at least nwcc is strong enough to compile itself (the result of which can compile nwcc as well) and should thus be capable of dealing with at least some small programs. There are still some things missing/broken, but things are improving almost all the time (I upload my changes to SF whenever I add/fix something of interest.)

Feature-wise, there is little interesting to be had in nwcc yet:

It takes a lot of work to get even a subset of the C language to compile, so the fact that something is missing or done wrong in nwcc does not mean that I don't care about that particular area of the C language or compiler design; It only means that I haven't gotten around to doing it right, or indeed at all, yet.

nwcc © Nils Weller 2003 - 2008 Valid XHTML 1.0 Strict
SourceForge Logo