bug-standards
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ISO opposes variable-length arrays???


From: Paul Eggert
Subject: Re: ISO opposes variable-length arrays???
Date: Sat, 19 Oct 2024 11:21:28 -0700
User-agent: Mozilla Thunderbird

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]