This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13896] Initializer string warning not printed if implied NULL-terminator out of bounds
- From: "schwab at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2004 14:42:46 -0000
- Subject: [Bug c/13896] Initializer string warning not printed if implied NULL-terminator out of bounds
- References: <20040128132357.13896.rhajdaj@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schwab at suse dot de 2004-01-28 14:42 -------
char a[][3] = {{"Hel"}, {"Hi"}};
is required to be equivalent to
char a[][3] = {{'H', 'e', 'l'}, {'H', 'i', '\0'}};
See 6.7.8#14.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13896