Switch language한국어
Back to the list

C extensions, portability, and alternative compilers | Hacker News

TL;DR AI

Key summary

2 min read
  1. An indie compiler author showed what it takes for slimcc to build real C software: test scripts, header fixes, and extra feature work.

  2. The examples exposed many portability failures in mainstream projects, including assumptions tied to GCC/Clang and missing fallback paths.

  3. Common pain points include compiler-specific attributes, SIMD flags, GNUC checks, stdatomic.h handling, and builtins like __builtin_ctzll.

  4. The discussion highlights how heavily C code depends on nonstandard extensions, making life hard for alternative compilers and hiding bugs in build logic.

Read the original