2017-12-06 Martin Sebor <msebor@redhat.com>
+ * doc/invoke.texi (-Wstringop-truncation): Mention attribute
+ nonstring.
+
PR tree-optimization/83075
* tree-ssa-strlen.c (handle_builtin_stxncpy): Avoid assuming
strncat/strncpy don't change length of source string.
@}
@end smallexample
+In situations where a character array is intended to store a sequence
+of bytes with no terminating @code{NUL} such an array may be annotated
+with attribute @code{nonstring} to avoid this warning. Such arrays,
+however, are not suitable arguments to functions that expect
+@code{NUL}-terminated strings. To help detect accidental misuses of
+such arrays GCC issues warnings unless it can prove that the use is
+safe. @xref{Common Variable Attributes}.
+
@item -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{|}cold@r{|}malloc@r{]}
@opindex Wsuggest-attribute=
@opindex Wno-suggest-attribute=