public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Liang Wang <netcasper@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: misleading description in vec.h?
Date: Mon, 26 Sep 2011 17:35:00 -0000	[thread overview]
Message-ID: <mcrpqini80v.fsf@coign.corp.google.com> (raw)
In-Reply-To: <CAO+NnCZE19MwgsULk17aWmzzZ7p2UxkC_KiRC6u0esXc3qAx0w@mail.gmail.com>	(Liang Wang's message of "Mon, 26 Sep 2011 23:15:26 +0800")

Liang Wang <netcasper@gmail.com> writes:

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

I think you are correct and the comment is wrong.

Ian

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 16:23 Liang Wang
2011-09-26 17:35 ` Ian Lance Taylor [this message]
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=mcrpqini80v.fsf@coign.corp.google.com \
    --to=iant@google.com \
    --cc=gcc@gcc.gnu.org \
    --cc=netcasper@gmail.com \
    /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).