https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86894
Bug ID: 86894 Summary: error for a zero-length array initialized with empty braced list Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- As discussed in the review at https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00601.html, when -Wpedantic is used, GCC rejects the following program with a hard error when it should be accepted with a pedantic warning. $ cat e.c && gcc -S -Wall -Wextra -Wpedantic e.c char a[] = { }; e.c:1:12: warning: ISO C forbids empty initializer braces [-Wpedantic] char a[] = { }; ^ e.c:1:6: error: zero or negative size array ‘a’ char a[] = { }; ^