https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116082
Harald van Dijk <harald at gigawatt dot nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |harald at gigawatt dot nl
--- Comment #7 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to uecker from comment #6)
> 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.
The warning is called -Wunterminated-string-initialization, but there is no
unterminated string. That is what this bug is about. If people want a warning
for truncated data, there should be a new warning for that, making
-Wunterminated-string-initialization do something other than what its name
clearly says it does is not the right way of handling that.