The compiler will ignore a flexible array element that was not there.
C11-Β§6.7.2.1 (p18)
[...] In most situations, the flexible element of an array is ignored. In particular, the size of the structure looks as if the element of the flexible array were omitted , except that it could have a longer complement than the omission, would imply [...].
AFAIK, the flexible array element is not part of the C ++ standard to C ++ 14. But GNU supports it as an extension . The behavior will be the same for C and C ++.
source share