From: Jonathan Wakely Date: Tue, 27 May 2025 08:11:58 +0000 (+0100) Subject: doc: Fix typo in description of nonstring attribute X-Git-Tag: releases/gcc-15.2.0~464 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9933a963a587349e22862668ea693bc1d4cc6693;p=thirdparty%2Fgcc.git doc: Fix typo in description of nonstring attribute gcc/ChangeLog: * doc/extend.texi (Common Variable Attributes): Fix typo in description of nonstring. (cherry picked from commit 351e60095cfaa73b5ac69222d00e0cd4ae5725d4) --- diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 0978c4c41b2..72b8e3720a3 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -7336,7 +7336,7 @@ truncate the copy without appending the terminating @code{NUL} character. Using the attribute makes it possible to suppress the warning. However, when the array is declared with the attribute the call to @code{strlen} is diagnosed because when the array doesn't contain a @code{NUL}-terminated -string the call is undefined. To copy, compare, of search non-string +string the call is undefined. To copy, compare, or search non-string character arrays use the @code{memcpy}, @code{memcmp}, @code{memchr}, and other functions that operate on arrays of bytes. In addition, calling @code{strnlen} and @code{strndup} with such arrays is safe