]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
doc: Fix typos in alloc_size documentation
authorDaniel Le Duc Khoi Nguyen <greenrecyclebin@gmail.com>
Tue, 12 Oct 2021 14:52:35 +0000 (10:52 -0400)
committerJeff Law <jeffreyalaw@gmail.com>
Tue, 12 Oct 2021 14:53:23 +0000 (10:53 -0400)
gcc/
* doc/extend.texi (Common Variable Attributes): Fix typos in
alloc_size documentation.

gcc/doc/extend.texi

index 133b82eef381cdd763647066f56239e9fb32ce8d..10d466fae9a4aa4b935974e2299b2a67456b3ece 100644 (file)
@@ -7359,10 +7359,10 @@ The @code{warn_if_not_aligned} attribute can also be used for types
 The @code{alloc_size} variable attribute may be applied to the declaration
 of a pointer to a function that returns a pointer and takes at least one
 argument of an integer type.  It indicates that the returned pointer points
-to an object whose size is given by the function argument at @var{position-1},
+to an object whose size is given by the function argument at @var{position},
 or by the product of the arguments at @var{position-1} and @var{position-2}.
 Meaningful sizes are positive values less than @code{PTRDIFF_MAX}.  Other
-sizes are disagnosed when detected.  GCC uses this information to improve
+sizes are diagnosed when detected.  GCC uses this information to improve
 the results of @code{__builtin_object_size}.
 
 For instance, the following declarations