C extensions, portability, and alternative compilers | Hacker News
TL;DR AI
2 min readKey summary
An indie compiler author showed what it takes for slimcc to build real C software: test scripts, header fixes, and extra feature work.
The examples exposed many portability failures in mainstream projects, including assumptions tied to GCC/Clang and missing fallback paths.
Common pain points include compiler-specific attributes, SIMD flags, GNUC checks, stdatomic.h handling, and builtins like __builtin_ctzll.
The discussion highlights how heavily C code depends on nonstandard extensions, making life hard for alternative compilers and hiding bugs in build logic.



