Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
A lot of C code has to run on older or proprietary compilers (or older coding standards that nobody updated) that don't implement the newest specs. Unlike other languages, every hardware/software platform needs to have a C compiler by default and this creates a lot of fragmentation, though gcc and LLVM have helped standardise a lot of stuff.
Though in my experience C99 is fairly prevalent. -
@RememberMe
GCC and standardize?!
GCC is at fault for creating a giant pile of code, incompatible with any other compiler, by activating GNU extensions by default and without warning.
I mean look at the Linux-kernel.
For a long time, it had a hard dependency on GCC because its actually not written in ANSI C, but in GNU C.
It only became compatible with Clang, because of the efforts of the LLVM team to introduced compatibility features for GCC. -
@metamourge true but not that relevant when talking about cross platform code though. gcc implements C standards just fine(ish).
And because it exists you can use the compiler frontend and optimization passes for free, you just need to make a backend. Similarly, clang. Hence "standardise". It's the frontend and optimizers that care about language standards, the backend is more or less independent of all that.
I came to notice something funny.
In many languages, programmers will go out of their way to use to newest, most shiny features, even if there isn't any need to.
Only in C, programmers will go out of their way to avoid new features and make their code compatible even with the oldest ANSI standards.
rant