3 ms·
For this sort of discussion it is important to distinguish between GCC/Clang-C and portable ISO/ANSI C, they are quite different in their range. Thinking of it,
by zokier 3y ago
For this sort of discussion it is important to distinguish between GCC/Clang-C and portable ISO/ANSI C, they are quite different in their range. Thinking of it, looking at the compiler extensions available in clang is probably insightful to see what you might be missing out on if you restrict yourself to portable C only.
As for specific features, for example function and parameter attributes[1][2] generally are not directly accessible in ISO C. You also have bit easier time controlling FP ops[3]; in ISO C they are annoyingly underdefined imho. For integers you have arbitrary width integer types (i42 is valid type in llvm, not expressible in C). For both you also have first-class vector types[4], while ISO C is afaik completely blind to vectorization.
That is just scratching the surface here. C doesn't really map anymore nicely to all the low-level intricacies we have these days like it did in the K&R days.
[1] https://llvm.org/docs/LangRef.html#function-attributes https://llvm.org/docs/LangRef.html#function-attributes
[2] https://llvm.org/docs/LangRef.html#parameter-attributes https://llvm.org/docs/LangRef.html#parameter-attributes
[3] https://llvm.org/docs/LangRef.html#floating-point-environment https://llvm.org/docs/LangRef.html#floating-point-environmen...
[4] https://llvm.org/docs/LangRef.html#vector-type https://llvm.org/docs/LangRef.html#vector-type