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
@wilfredh The "can't compile hello world" bug report had nothing to do with the source code -- the compiler expected include files in the particular location of the systems it was built on, and couldn't find them when built on a system that located them differently. (Read the bug report and you'll see perfectly intelligible messages saying "stddef.h not found", etc. It did compile postgres to binaries that passed the test suite, and PG does require this header. A lot.)