Anthropic used Claude to write a C compiler in Rust (CCC). I've really enjoyed following the discussion.

The initial post shows how they wrote the harness with GCC as an oracle and a prompt specifying a design using SSA. The author has clear domain expertise.

https://www.anthropic.com/engineering/building-c-compiler

Building a C compiler with a team of parallel Claudes

Anthropic is an AI safety and research company that's working to build reliable, interpretable, and steerable AI systems.

Later testing showed some overfitting to the test harness: it can compile Linux, but not hello world!

https://github.com/anthropics/claudes-c-compiler/issues/1

Hello world does not compile · Issue #1 · anthropics/claudes-c-compiler

Tested inside fedora 43 container, ubuntu 26.04 container and on regular fedora 42 installation, same error Took example directly from README.md GCC is present and can compile code just fine: root:...

GitHub

Benchmarking showed that CCC has much worse performance in terms of both compile time and runtime.

Since it was designed to match gcc flags, it supports both -O0 and -O2, but the output is identical. It produces working code, but it doesn't optimise.

https://harshanu.space/en/tech/ccc-vs-gcc/

CCC vs GCC

A Guide to comparing Claude Code Compiler with GCC

Harshanu
@wilfredh A compiler without optimizations? So basically a macro assembler? Something that's really only different from a college student's homework assignment insofar as it has to has to support a bunch of historical quirks in the language's syntax?