This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: misleading description in vec.h?


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]