On 2024-10-19 00:31, Bruno Haible wrote:
#ifndef __STDC_NO_VLA__
...
#endif
So, the feature is optional in the sense that the compiler may or may not
implement it. (It still can be conforming to ISO C 11, in either case.)
But it has to declare (via this macro) whether it implements it.
Right, and the situation is muddied a bit further in ISO C C23, which
changed the meaning of __STDC_NO_VLA__ so that it now governs only
whether variable length arrays with automatic storage duration are
supported. That is, in C23 other uses of VLAs are always supported,
regardless of whether __STDC_NO_VLA__ is defined.