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

--- Comment #6 from uecker at gcc dot gnu.org ---

This is not about padding. The string literal has a final NUL character and
yours then has two. The warning is about truncation of the final NUL character
in the string literal. So I think the warning is correct. It does not warn
about the result not being NUL-terminated, but about truncating a NUL from the
initializer. So only the part about the attribute could be misleading.  IMHO
the warning should be in -Wall.

Reply via email to