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.

Reply via email to