This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/85252] [6/7/8 Regression] ICE with -g for static zero-length array initialization
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Apr 2018 11:57:54 +0000
- Subject: [Bug debug/85252] [6/7/8 Regression] ICE with -g for static zero-length array initialization
- Auto-submitted: auto-generated
- References: <bug-85252-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85252
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As for warning/error, we do accept static char a[1] = "a"; without warning, and
emit a warning for static char a[1] = "ab";
warning: initializer-string for array of chars is too long
and similarly emit a warning for a[0] = "a";