To Save C, We Must Save ABI

To Save C, We Must Save ABI

The C programming language's ABI (Application Binary Interface) is a hidden contract that determines how functions and structs are represented in binary. Breaking it can cause silent, catastrophic failures. This article argues that while ABI stability is often seen as a burden, it is crucial for C's survival. It demonstrates how changing a function's parameter type from long long to __int128_t alters the assembly code, requiring different registers and conventions, and shows how a mismatch between declaration and definition can lead to undefined behavior. The author contends that preserving ABI is essential for C's ecosystem, even as it limits innovation.

This is not a source code-level contract: it is one forged by the compiler, on your behalf, with other compilers and other machines.

More from this day

2026-08-11