On 01/27/2016 11:52 AM, Martin Sebor wrote:
I agree that there is some risk that it might break some working programs. I would expect the most common use of initialized VLAs be to set all elements to zero using the "= { }" or "= { 0 }" syntax. Initializers with more elements are, IMO, likely to be a bug where the user doesn't realize they defined a VLA rather than an ordinary array. Since VLAs are required to have at least 1 element, would diagnosing initializers with more than one element more loudly (such as by default or with -Wall as opposed to with -Wpedantic) be a good solution?
That makes sense to me. Jason