Linux 3.15 Can Almost Be Compiled Under LLVM's Clang
phoronix.com
phoronix.com
"error: fields must have a constant size: 'variable length array in structure' extension will never be supported"
Even if something isn't in the standard, if it allows less code to be written, it is a good thing. My question is then:
Why?
It's obviously used in kernel, that's how I discovered about that clang curiously worded error message: by reading the LLVMLinux site:
http://llvm.linuxfoundation.org/index.php/Broken_kernel_opti...
Their biggest point was, and remains, that variable length arrays inside structs have no defined semantics at all. GCC has no design document specifying their behaviour. It is impossible to tell what about their behaviour is undefined happenstance and what is intentional. There is no means of determining how Clang should behave in any number of corner cases (presuming you could even enumerate them all), short of reverse engineering the behaviour of a specific release of GCC, and praying that that release's implementation was bug-free and displayed no undefined behaviour (spectacularly unlikely, for a little-used and obscure feature like this).
I see a lot of developers like to ignore C, giving immense priority to C++ and that makes me sad. C has certainly potential to also get some features first implemented by major compilers and only then standardized, just like it happens all the time with other languages.
"Will never be implemented" in the compiler error message is still quite telling about the climate among the clang developers. Are you one of them?