Remix.run Logo
einpoklum an hour ago

> Anyone who's written C knows that full ISO C standard-adhering code is an impractical rarity.

I've written quite a bit of C code and do not know that to be a rarity. Especially when it comes to libraries rather than applications, and FOSS as opposed to proprietary code.

> Most real world C code out there relies on non-standard behaviors and language extensions to varying extents

Maybe it depends on which domain you're working in. At companies whose target platform is not a PC, relying on idiosycratic behavior, or extensions, is difficult: The compiler for the target device may simply not support the bells and whistles of GCC or whatever, so you stick to C99, (or even C89, ugh) to be on the safe side. And even then there will be things which are standard, but... well, I would be wary of relying on them being supported robustly enough, e.g. variable-length arrays.

And of course, once your code does not target just one single machine then you're forced to have to worry about portability and standard compliance etc.

kouosi an hour ago | parent [-]

> And of course, once your code does not target just one single machine then you're forced to have to worry about portability and standard compliance etc.

Well linux exclusively usages gcc to compile.

fanf2 17 minutes ago | parent [-]

https://www.kernel.org/doc/html/latest/kbuild/llvm.html