nwcc

A small C compiler for Unix systems
Download

nwcc Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Nils Weller
  • Publisher web site:

nwcc Tags


nwcc Description

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. Here are some key features of "nwcc": · 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!) What's New in This Release: · This version adds support for Mac OS X on x86 and AMD64, and NetBSD on x86 systems. Various platform-independent bugs have also been fixed.


nwcc Related Software