4 ms·
Please don't use GNU C, or any other non-standardized version of C. A huge part of the reason C that is so widespread is because it's a well defined standard im
by Sir_Cmpwn 9y ago
Please don't use GNU C, or any other non-standardized version of C. A huge part of the reason C that is so widespread is because it's a well defined standard implemented by many compilers for many platforms. GNU C is defined by its implementation, which is awful.
- emilfihlman 9y agoThere is nothing wrong with using GCC extensions. Also, porting C is not that hard and does not require you to touch internals that much.
- jcelerier 9y ago> Please don't use GNU C, or any other non-standardized version of C. Everything standard was once non-standard ; if no one uses it it will never be standardised and we will be left with a poor status quo. For instance, there wouldn't be int8_t, etc... if people weren't using non-standard macros beforehand. Likewise for atomics, threads, etc.
- exDM69 9y agoI disagree with this. A lot of GNU C works on both, GCC and Clang which covers most platforms out there. Those extensions are useful and allow better portability across architectures. E.g. SIMD extensions is much better than writing two implementations with NEON and SSE intrinsics.
- pcwalton 9y agoPlease do use GNU C if you're going to use C. The viral nature of the Linux kernel has forced GNU C to be an important de facto standard. Take advantage of that!
- pjmlp 9y agoGoogle has taken the effort to make Linux compile with clang, as part of their efforts to wipe gcc from Android toolchain. There is a LLVM talk about it. However I do agree with you. clang and gcc cover most of the systems that matter today and their C extensions definitely make C a safer language.
- alerighi 9y agoWhy not ? If I don't care about portability because for example I'm writing a software that it's meant to be used only on Linux because it uses Linux specific libraries or system calls and I know that there gcc it's the standard I use the extension if they can simplify my code ?