From patchwork Tue Sep 27 01:32:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liang Wang X-Patchwork-Id: 116529 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C3F1EB6F75 for ; Tue, 27 Sep 2011 11:32:41 +1000 (EST) Received: (qmail 26809 invoked by alias); 27 Sep 2011 01:32:40 -0000 Received: (qmail 26794 invoked by uid 22791); 27 Sep 2011 01:32:38 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Sep 2011 01:32:16 +0000 Received: by wyh5 with SMTP id 5so7083388wyh.20 for ; Mon, 26 Sep 2011 18:32:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.221.65 with SMTP id q43mr3609268wep.22.1317087135635; Mon, 26 Sep 2011 18:32:15 -0700 (PDT) Received: by 10.216.5.65 with HTTP; Mon, 26 Sep 2011 18:32:15 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Sep 2011 09:32:15 +0800 Message-ID: Subject: Re: [PATCH] fix misleading description in vec.h From: Liang Wang To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Tue, Sep 27, 2011 at 9:27 AM, Liang Wang wrote: > Hi, > > I find that the description from line 36, gcc/vec.h is wrong.  It > should be the pointers in structure object variant are dereferenced > and the objects copied into the vector. > > The following patch makes the *former* and *latter* in comment to > point to the right thing. > > OK for trunk? > > By the way, I don't have write access to SVN repository yet.  Could > you please help commit it after approval? > > Thanks, > Liang. > > 2011-09-27  Liang Wang > >        * gcc/vec.h: Fix comment. > > > diff --git a/gcc/vec.h b/gcc/vec.h > index 789e8e2..46d9da4 100644 > --- a/gcc/vec.h > +++ b/gcc/vec.h > @@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see > >    Because of the different behavior of structure objects, scalar >    objects and of pointers, there are three flavors, one for each of > -   these variants.  Both the structure object and pointer variants > +   these variants.  Both the pointer and structure object 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.  The scalar > Sorry. I forget to attach files. diff --git a/gcc/vec.h b/gcc/vec.h index 789e8e2..46d9da4 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see Because of the different behavior of structure objects, scalar objects and of pointers, there are three flavors, one for each of - these variants. Both the structure object and pointer variants + these variants. Both the pointer and structure object 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. The scalar