Sujet : Re: Two questions on arrays with size defined by variables
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.cDate : 09. Feb 2025, 19:19:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250209201902.000019e5@yahoo.com>
References : 1 2 3 4 5 6 7
User-Agent : Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
On Sun, 9 Feb 2025 18:46:44 +0100
Janis Papanagnou <janis_papanagnou+
ng@hotmail.com> wrote:
wrong! - assignment to 'a[99]' produced also no compiler complaints,
gcc produces warning in this case, but only at optimization level of 2
or higher.
clang does not warn at all, which is disappointing.
OTOH, for non-VLA clang (and MSVC) warn at any optimization level. gcc
behaves the same as with VLA, which is disappointing.