https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83190
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- sizeof "012\0" is 5. There are two NULs at the end, one explicit in the initializer string and one implicitly appended by the compiler. That the size is 5 can also be seen in the dump of g(): g () { char a[5]; ... }