Hacker News new | ask | show | jobs
by ranger_danger 213 days ago
Yes, but now your code is no longer C or C++ standards compliant as it relies on compiler-specific attributes, if that matters to the programmer.

Unfortunately, even the Linux kernel is no longer C because they use GCC compiler extensions (and are currently discussing adding MS ones too).

1 comments

A kernel will make use of asm, and can't abstract over the machine, so it will always be unportable and relying on compiler extensions.
The Linux kernel did not always rely on compiler extensions though...
The kernel once did not need asm? That's a compiler extension, although a popular one.