News: 0001596722

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 6.19 Goes Ahead And Enables Microsoft C Extensions Support

([Linux Kernel] 4 Hours Ago -fms-extensions)


Last month I reported on [1]Linux 6.19 looking to enable Microsoft C Extensions support throughout the Linux kernel with setting the -fms-extensions compiler option to allow Microsoft C Extensions when building the kernel. Linus Torvalds today merged that support without objections.

The Microsoft C Extensions allow for some non-standard C/C++ constructs within the GCC and LLVM/Clang compilers. They are named the Microsoft C Extensions for being found in some Microsoft header files and being honored by the Microsoft Visual C/C++ compiler.

The main emphasis on enabling the Microsoft C Extensions is for permitting use of a tagged struct or union anonymously in another struct/union. This can allow for some "prettier code" while past efforts to enable -fms-extensions for the Linux kernel everywhere ended up falling through.

But now as of tonight in the mainline Linux 6.19 Git kernel state, the option has landed along with some early usage of it. The Btrfs file-system code adapted as an example comes down to:

More details for those interested via the [2]Kbuild merge .



[1] https://www.phoronix.com/news/Linux-6.19-Patch-Would-MS-Ext

[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2ddcf4962c1834a14340a1f50afafc3276c015bd



My central memory of that time seems to hang on one or five or maybe forty
nights -- or very early mornings -- when I left the Fillmore half-crazy and,
instead of going home, aimed the big 650 Lightning across the Bay Bridge at
a hundred miles an hour ... booming through the Treasure Island tunnel at
the lights of Oakland and Berkeley and Richmond, not quite sure which
turnoff to take when I got to the other end ... but being absolutely certain
that no matter which way I went I would come to a place where people were
just as high and wild as I was: no doubt at all about that.
-- Hunter S. Thompson