统计截止 2024-12-31。

  • tcc:极品黑客 Fabrice Bellard 打造的极品编译器;
  • pcc:Bell Labs 出品,Dennis Ritchie 背书,名门闺秀,差点成为 BSD 系标配,被 Clang 顶翻了;
  • cparser:德国 Karlsruhe 大学出品,基于图表示的优化框架;
  • nwcc:个人作品,已停止开发;
  • ack:Amsterdam Compiler Kit,Andrew Tanenbaum 出品,Minix 1 & 2 御用,不支持 64bit,在 Minix 3 中被 Clang 代替;
  • watcom:Open Watcom C/C++,当年与 Borland、Microsoft 竞争的编译器和 IDE,64bit 支持开发中;
  • vbcc:支持很多 32bit CPU 架构,有一定优化能力;
  • scc & cproc:基于 QBE 编译器后端,QBE 定位于用 10% 代码实现工业级 C 编译器 70% 的性能;
  • kefir & lacc:个人练手作品;
  • lcc & chibicc: C 编译器编写教学;
编译器tccpcccparsernwccackwatcomvbccscccprockefirlacclccchibicc
源码库TinyCCpcc-libs, pcccparsernwccackopen-watcom-v2vbccsimple-cccprockefirlacclccchibicc
许可证LGPL / MIT-likeBSDGPLv2 + LGPLv2.1BSDBSD-likeGPL-likeBSDCaldera / ISCMIT-likeGPLv3MITLCCMIT
最新版本0.9.2711.1.021.22.030.8.346.0-pre551.96N/AN/AN/A0.4.0N/A4.27N/A
发布时间2017-12-132014-12-102016-01-012014-08-172016-06-022010-06-022022-04-292024-12-312024-04-282024-09-112022-05-222007-02-192020-12-07
C 标准C99C99C11C99C89C99, C++98C99C99C11C17C89C89C11
预处理器(cpp)8
汇编器(as)
链接器(ld)
位置无关代码(PIC)
线程局部存储(TLS)
易失变量(volatile)
变长数组(VLA)
复数
内联汇编
GCC 兼容partialpartialpartialpartialpartialpartialpartial
CPU 架构i386/x86_64, arm/aarch64, riscv64i386/amd64, arm/aarch64, mips, …i386/amd64, arm, riscv32, mips, …x86/amd64, mips, …i386, arm, mips, …i386/x64, arm, ppc, …i386, arm, ppc, …i386/amd64, ppc/ppc64amd64, arm64, riscv64amd64amd64x86, mips, sparcamd64
操作系统Linux, BSD, macOS, Win32Linux, BSD, macOS, Win32Linux, BSD, macOS, Win32Linux, BSD, macOSLinux, BSD, macOS, Win32Linux, macOS, DOS, Win32Linux, BSD, Win32Linux, BSDLinux, BSDLinux, BSDLinux, BSDLinux, Win32Linux, BSD
优化能力partialpartialpartialpartialwellwellpartialpartialpartialpartial
调试符号
性能剖析
代码行数10w12w16w99w34w170w1010w3w112w1211w1.9w2w7k

其它值得一提的 C 编译器:

  • GitHub - Vexu/arocc: A C compiler written in Zig: Currently most of standard C is supported up to C23 and as are many of the common extensions from GNU, MSVC, and Clang.

  • Dlang’s ImportC

  • smorgasbordet - Pelles C: Pelles C is a complete development kit for Desktop Windows. It contains among other things an optimizing C compiler, a macro assembler, a linker, a resource compiler, a message compiler, a code signing utility, a make utility and an install builder. 

    It also contains an integrated development environment (IDE) with project management, debugger, profiler, source code editor, and resource editors for dialogs, menus, string tables, accelerator tables, bitmaps, icons, cursors, animated cursors, animation videos (AVI’s without sound), versions and manifests.

    The compiler was originally based on LCC (by Chris Fraser and David Hanson), but since then enhanced with support for C99/C11/C17/C2x, a global optimizer, a new register allocator, a function inliner, intrinsic functions, and many Microsoft C extensions.

  • lcc-win: A Compiler system for windows: The system is self contained: you do not need anything else to get started programming in C in the Win32 environment. You get

    1. Code generator (compiler, assembler, linker, resource compiler, librarian) 
    2. Integrated development environment with editor, debugger, make file generation, resource editor, etc. 
    3. User manual and technical documentation.
  • SDCC - Small Device C Compiler: SDCC is a retargettable, optimizing Standard C (ANSI C89, ISO C99, ISO C11, ISO C23) compiler suite that targets the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.)Maxim(formerly DallasDS80C390 variants, Freescale (formerly MotorolaHC08 based (hc08, s08)Zilog Z80 based MCUs (Z80, Z180, SM83, Rabbit 2000, 2000A, 3000A, TLCS-90, R800)Padauk (pdk14, pdk15)STMicroelectronics STM8MOS 6502 and WDC 65C02. Work is in progress on supporting the Padauk pdk13 target; Microchip PIC16 and PIC18 targets are unmaintained.

一些 C 语言的替代品:


  1. mob 分支持续更新。 ↩︎

  2. 开发 1.2.0 中,最后更新于 2022-03-31。 ↩︎

  3. master 分支最后更新于 2023-11-04。 ↩︎

  4. develop 分支最后更新于 2017-09-02。 ↩︎

  5. dev 分支持续更新。 ↩︎

  6. 2.0 分支持续更新。 ↩︎

  7. master 分支持续更新。 ↩︎

  8. nwcpp 不成熟。 ↩︎

  9. libfirm 12w, cparser 4w。 ↩︎

  10. 只统计 C 和汇编相关。 ↩︎

  11. 不包括依赖的 qbe。 ↩︎

  12. qbe 1.4w, cproc 9k。 ↩︎