On Sat, 28 Mar 2020, Jakub Jelinek via Gcc-patches wrote:

> Hi!
> 
> After we report various errors about array size, we set for error-recovery
> the size to be 1, but because size_int_const is false, it still means we
> pretend the array is a VLA, can emit a second diagnostics in that case etc.
> E.g.
> $ ./cc1.unpatched -quiet a.c
> a.c:1:5: error: size of array ‘f’ has non-integer type
>     1 | int f[100.0];
>       |     ^
> a.c:1:1: warning: variably modified ‘f’ at file scope
>     1 | int f[100.0];
>       | ^~~
> $ ./cc1 -quiet a.c
> a.c:1:5: error: size of array ‘f’ has non-integer type
>     1 | int f[100.0];
>       |     ^
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to