public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Liang Wang <netcasper@gmail.com>
To: gcc@gcc.gnu.org
Subject: misleading description in vec.h?
Date: Mon, 26 Sep 2011 16:23:00 -0000	[thread overview]
Message-ID: <CAO+NnCZE19MwgsULk17aWmzzZ7p2UxkC_KiRC6u0esXc3qAx0w@mail.gmail.com> (raw)

Hi,

Here is comment from line 36, gcc/vec.h

Both the structure object and pointer variants
pass pointers to objects around -- in the former case the pointers
are stored into the vector and in the latter case the pointers are
dereferenced and the objects copied into the vector.

But by reading implementation, it seems that this description is reverse.
I think that it should be something like

in the *latter* case the pointers
are stored into the vector and in the *former* case the pointers are
dereferenced and the objects copied into the vector.

That is, the pointers in structure object variant are dereferenced and
the objects copied into the vector.

Am I missing something?

Thanks,
Liang.

             reply	other threads:[~2011-09-26 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 16:23 Liang Wang [this message]
2011-09-26 17:35 ` Ian Lance Taylor
2011-09-27  9:51   ` Liang Wang

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=CAO+NnCZE19MwgsULk17aWmzzZ7p2UxkC_KiRC6u0esXc3qAx0w@mail.gmail.com \
    --to=netcasper@gmail.com \
    --cc=gcc@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).