https://gcc.gnu.org/bugzilla/show_bug.cgi?id=76733

            Bug ID: 76733
           Summary: GCC should warn on repeated initializer for same array
                    element / struct member.
           Product: gcc
           Version: 5.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rusty at rustcorp dot com.au
  Target Milestone: ---

Hit a nasty cut & paste bug in my code (extra comma before +3):

   int x[] = { [0] = 1, +3, [1] = 1 };

This double-initialization of x[1] should cause a warning.  Similarly:

   struct s { int a, b; } s = { .a = 1, .a = 2};

Thanks!

Reply via email to