Messages in this thread | | | From | Linus Torvalds <> | Date | Sat, 23 Sep 2023 11:02:22 -0700 | Subject | Re: [GIT PULL] hardening fixes for v6.6-rc3 |
| |
On Sat, 23 Sept 2023 at 09:53, Alexey Dobriyan <adobriyan@gmail.com> wrote: > > This doesn't work with g++ :-(
Whee. So the compiler seems to literally test "is it at offset 0", and refuses to do flex arrays there.
Oh well. So flex arrays are just not usable on C++, because the language tries to "protect" us from outselves. What else is new. I suspect it's the same broken reason that empty structs aren't zero-sized - stop the user from being clever.
I had hoped that the C++ people had learnt from their mistakes, but no.
Happily we don't have to deal with that crud for kernel code. I don't like the #ifdef, but if it's needed...
Linus
| |