public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Liang Wang <netcasper@gmail.com>
To: Ian Lance Taylor <iant@google.com>
Cc: gcc@gcc.gnu.org
Subject: Re: misleading description in vec.h?
Date: Tue, 27 Sep 2011 09:51:00 -0000	[thread overview]
Message-ID: <CAO+NnCYKB4Uroq-jrF7x6s9QY5y7Ny+gKFiE_hkoAfgp6YUr1Q@mail.gmail.com> (raw)
In-Reply-To: <mcrpqini80v.fsf@coign.corp.google.com>

On Tue, Sep 27, 2011 at 12:27 AM, Ian Lance Taylor <iant@google.com> wrote:
> 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.

Thanks.  Patch is sent to gcc-patches.

Liang

>
> Ian
>

      reply	other threads:[~2011-09-27  1:29 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
2011-09-27  9:51   ` Liang Wang [this message]

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+NnCYKB4Uroq-jrF7x6s9QY5y7Ny+gKFiE_hkoAfgp6YUr1Q@mail.gmail.com \
    --to=netcasper@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=iant@google.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).