Need suggestion about bug 68425

Manuel López-Ibáñez lopezibanez@gmail.com
Thu Feb 18 14:29:00 GMT 2016


On 18/02/16 11:40, Prasad Ghangal wrote:
> Wouldn't it be nice instead of multiple warnings if gcc gives single
> warning like :
>
> 68425.c:3:34: warning: excess elements in array initializer (6
> elements, expected 2)
>      const int array[2] = { 1, 2, 3 ,6 ,89 ,193};
>                                            ^

Yes! Perhaps even (now that we have ranges!):

68425.c:3:34: warning: excess elements in array initializer (6 elements, 
expected 2)
       const int array[2] = { 1, 2, 3 ,6 ,89 ,193};
                                    ^~~~~~~~~~~~~

But even without ranges, your suggestion would be a great improvement.

Cheers,

	Manuel.



More information about the Gcc mailing list