From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4105 invoked by alias); 16 Apr 2011 20:42:24 -0000 Received: (qmail 4082 invoked by uid 22791); 16 Apr 2011 20:42:23 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 16 Apr 2011 20:42:06 +0000 Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id p3GKg4MT005921 for ; Sat, 16 Apr 2011 13:42:04 -0700 Received: from gxk26 (gxk26.prod.google.com [10.202.11.26]) by hpaq12.eem.corp.google.com with ESMTP id p3GKg2JF010687 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sat, 16 Apr 2011 13:42:03 -0700 Received: by gxk26 with SMTP id 26so1800614gxk.18 for ; Sat, 16 Apr 2011 13:42:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.31.4 with SMTP id e4mr3274717ybe.127.1302986522570; Sat, 16 Apr 2011 13:42:02 -0700 (PDT) Received: by 10.150.212.19 with HTTP; Sat, 16 Apr 2011 13:42:02 -0700 (PDT) In-Reply-To: <20110416203023.575C1AE18B@tobiano.tor.corp.google.com> References: <20110416203023.575C1AE18B@tobiano.tor.corp.google.com> Date: Sat, 16 Apr 2011 22:46:00 -0000 Message-ID: Subject: Re: [google] Initialize fields in default ctor for _Hashtable_iterator (issue4430051) From: Diego Novillo To: reply@codereview.appspotmail.com, davidxl@google.com, libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01288.txt.bz2 Geez, working on too many different branches. This is *not* a pph patch. On Sat, Apr 16, 2011 at 16:30, Diego Novillo wrote: > I am committing this patch for David Li on google/main. > > The patch adds explicit initialization to the fields of > _Hashtable_iterator in its default constructor. =C2=A0David, could you > describe why this change was needed? =C2=A0Will you be submitting for > trunk? > > Tested on x86_64. =C2=A0Committed to google/main. > > > Diego. > > 2011-04-15 =C2=A0Xinliang David Li =C2=A0 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0Google ref 43787. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0* include/backward/hashtable.h > =C2=A0 =C2=A0 =C2=A0 =C2=A0(_Hashtable_iterator::_Hashtable_iterator): In= itialize _M_cur and > =C2=A0 =C2=A0 =C2=A0 =C2=A0_M_ht in default constructor. > > diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/inc= lude/backward/hashtable.h > index 0bcaec4..c3eefcc 100644 > --- a/libstdc++-v3/include/backward/hashtable.h > +++ b/libstdc++-v3/include/backward/hashtable.h > @@ -126,7 +126,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > =C2=A0 =C2=A0 =C2=A0 _Hashtable_iterator(_Node* __n, _Hashtable* __tab) > =C2=A0 =C2=A0 =C2=A0 : _M_cur(__n), _M_ht(__tab) { } > > - =C2=A0 =C2=A0 =C2=A0_Hashtable_iterator() { } > + =C2=A0 =C2=A0 =C2=A0_Hashtable_iterator() > + =C2=A0 =C2=A0 =C2=A0: _M_cur(0), _M_ht(0) { } > > =C2=A0 =C2=A0 =C2=A0 reference > =C2=A0 =C2=A0 =C2=A0 operator*() const > > -- > This patch is available for review at http://codereview.appspot.com/44300= 51 >