https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836
--- Comment #9 from Kees Cook <kees at outflux dot net> --- Just to clarify, __builtin_dynamic_object_size() shouldn't have anything to do with this. What's needed is something like -fstrict-flex-arrays so that all the "trailing array is a flex array" assumptions can be killed everywhere in GCC. Only an _actual_ flex array should be treated as such.