This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need suggestion about bug 68425
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: Prasad Ghangal <prasad dot ghangal at gmail dot com>
- Cc: gcc at gcc dot gnu dot org, Joseph Myers <"\"joseph"@codesourcery.com>
- Date: Thu, 18 Feb 2016 14:28:57 +0000
- Subject: Re: Need suggestion about bug 68425
- Authentication-results: sourceware.org; auth=none
- References: <CAE+uiWYLZ6ODDc3nR3zgAdxekTtSAD10Ba3pqJ4Y--FJYo5Fig at mail dot gmail dot com>
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.