nwcc 0.8.2

A small C compiler for Unix systems
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 does nwcc bring to the table? Most importantly, new code: I wrote everything from scratch - including the lexer, parser and backend.

The code of nwcc is written in C.

This 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 every day (I upload my changes to SF whenever I add/fix something of interest.)

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.

Main features:

  • There are some C language features missing; Most notably support for floating point, bitfields and a few other things. Many other things are broken (there are probably bugs in pretty much every language feature implemented by nwcc)
  • There are no features a power developer used to established mainstream compilers would consider interesting, yet (apart from, maybe, the stack protection feature.) Sorry. There is nothing beyond plain dumb compilation; No support for creating shared libraries, no support for debugging or profiling, no nothing
  • There is currently only a backend for 80x86 processors (which generates code for the NASM Netwide Assembler and works on Linux, FreeBSD and OpenBSD)
  • There is absolutely no optimization, meaning the generated code is very slow compared to the output of established compilers. I will work on this soon, but you should understand that my primary concerns right now are code correctness and portability rather than speed (it's hard enough to make slow code work!)

last updated on:
August 4th, 2011, 14:42 GMT
price:
FREE!
developed by:
Nils Weller
homepage:
nwcc.sourceforge.net
license type:
BSD License 
category:
ROOT \ Programming \ Compilers

FREE!

In a hurry? Add it to your Download Basket!

user rating 24

3.0/5
 

0/5

Rate it!
What's New in version 0.8.1
  • This release fixes a few (really not too many!) general and PIC-specific bugs that were encountered while compiling Tcl and mksh.
read full changelog

Add your review!

SUBMIT