public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Le Duc Khoi Nguyen <greenrecyclebin@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] doc: Fix typos in alloc_size documentation
Date: Sat, 9 Oct 2021 17:59:33 +0800	[thread overview]
Message-ID: <CANtZXCq4Ve5U=kLuZBbF0W8xvoRyybVgVhtEmfMcF7+MiWUeCw@mail.gmail.com> (raw)

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(-)

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}.

 For instance, the following declarations
-- 
2.25.1

--
Regards,
Daniel

             reply	other threads:[~2021-10-09  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09  9:59 Daniel Le Duc Khoi Nguyen [this message]
2021-10-12 14:53 ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANtZXCq4Ve5U=kLuZBbF0W8xvoRyybVgVhtEmfMcF7+MiWUeCw@mail.gmail.com' \
    --to=greenrecyclebin@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).