Re:Maximal Min() and Max()
by alerighi on Thursday August 08, 2024 @01:37PM
(#41194172)
It would be far easier to add as builtins the features that are missing to GCC than change the language, that would involve rewriting a ton of code (even switching from C to C++ they are not 100% compatible, also, they may introduce bugs difficult to spot cause their incompatibility). The Linux kernel already uses a ton of GCC extensions (even the min/max macros suggested in the article) that is not compatible with other compilers anyway (and I don't see a reason to be, since GCC is the compiler of the GNU project anyway, unlikely to compile the Linux kernel with MSVC, or even I don't see much reasons to use clang anyway).
[ Parent
| on HN ]
> The Linux kernel already uses a ton of GCC extensions
You'll be happy to know that GCC happily compiles C++ then! No need to switch to MSVC.
I'm fact GCC itself successfully switched to C++ from C a few years ago.