PEP-7 update to allow C99 flexible array member syntax

I need this to solve a C undefined behavior issue in the language approved manner. describes the language feature better than I can.

Why? See and code using it in

What does it allow us to change? Instead of ending variable length structures with char spam[1]; as we do today for PyBytesObject and unicode’s internal struct encoding_map, end them with char spam[]; (and adjust any size computations when relevant).

So far testing (CI and all the buildbots it throws at it) have not turned up any compilers with issues. It has been around for 21 years. I’d be surprised to find any that balk at it.

Any objections?


AFAIK this syntax is incorrect in C++.