doc: Fix typos in alloc_size documentation

Message ID CANtZXCq4Ve5U=kLuZBbF0W8xvoRyybVgVhtEmfMcF7+MiWUeCw@mail.gmail.com
State New
Headers
Series doc: Fix typos in alloc_size documentation |

Commit Message

Daniel Le Duc Khoi Nguyen Oct. 9, 2021, 9:59 a.m. UTC
  2021-10-09  Daniel Le  <greenrecyclebin@gmail.com>

        * doc/extend.texi (Common Variable Attributes): Fix typos in
        alloc_size documentation.
---
 gcc/doc/extend.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

 For instance, the following declarations
  

Comments

Jeff Law Oct. 12, 2021, 2:53 p.m. UTC | #1
On 10/9/2021 3:59 AM, Daniel Le Duc Khoi Nguyen via Gcc-patches wrote:
> 2021-10-09  Daniel Le  <greenrecyclebin@gmail.com>
>
>          * doc/extend.texi (Common Variable Attributes): Fix typos in
>          alloc_size documentation.
Thanks.  I've installed this on the trunk.
jeff
  

Patch

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 133b82eef38..10d466fae9a 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -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}.