michaelforney/cproc
FreeC11 compiler (mirror)
About michaelforney/cproc
cproc is a C compiler that uses QBE as its backend, released under the ISC license. It implements most of the C11 standard along with many C23 features and a few GNU C extensions. The compiler is written in standard C99 and can be built with any conforming C99 compiler. It aims to closely follow the C standard while remaining practical enough to compile many real-world software packages. Supported target architectures via QBE include x86_64, aarch64, and riscv64, with continuous testing on various Linux (musl/glibc), FreeBSD, and ARM/RISC-V environments. The project philosophy avoids implementing multiple C versions; instead, code must be updated to match new standards. An external preprocessor is required because cproc's built-in preprocessor is not fully implemented.
Key Features
Pros & Cons
- Strong focus on C standard conformance while remaining practical
- Supports modern C features including C23
- Small and lightweight codebase written in portable C99
- Multi-architecture support via QBE backend (x86_64, aarch64, riscv64)
- Permissive ISC license allows free use and modification
- Built-in preprocessor is not fully implemented, requiring an external preprocessor
- Does not support multiple C versions seamlessly; code may need adaptation for newer standards
- May require small patches for non-conforming C code due to strict adherence to standards
- Limited to architectures supported by QBE (currently x86_64, aarch64, riscv64)