features
The primary goals of nwcc currently are portability and correctness. Due to the amount of required work, many tradeoffs are necessary. As a result of many tradeoffs and compromises, neither nwcc's portability nor its correctness seem particularly impressive for the time being - But stay tuned, things will only get better!
- The currently supported architectures are x86, AMD64, SPARC, MIPS and PowerPC. ARM is going to join this list some time soon, possibly followed by other embedded architectures or PA-RISC within the next year
- Cross-compilation is supported (but not heavily tested!)
- nwcc implements most of C90 (ISO C), though various language constructs that are particularly obscure, rarely used and/or of dubious usefulness are not yet implemented, or implemented in a broken way - see the bugs page for details
- Various GNU C and C99 features are also supported, such as
- The long long type
- inline/restrict keywords (ignored)
- typeof()/alignof()
- computed gotos
- __func__/__PRETTY_FUNCTION__
- flexible array members
- compound literals and designated initializers
- (very incomplete single-dimensional) VLA support
- statements as expressions
- mixed declarations and code
- builtin stdarg functions
- builtin alloca()
- gcc style inline assembly (only on x86 and AMD64)
- The x86 and AMD64 backends support two assemblers; nasm/yasm and gas. This can be useful for side-by-side assembler syntax comparison
- nwcc can already generate many useful warnings, in some cases more so than gcc
- There is basic support for PIC (position-independent code) and TLS (thread-local storage)
- Various other little (mostly half-baked) features, such as very basic stack overflow protection (x86/AMD64-only), primitive function call trace instrumentation (similar to ltrace, x86-only), colored warning/error messages