public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Diego Novillo <dnovillo@google.com>
To: reply@codereview.appspotmail.com, davidxl@google.com,
	       libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [google] Initialize fields in default ctor for _Hashtable_iterator (issue4430051)
Date: Sat, 16 Apr 2011 22:46:00 -0000	[thread overview]
Message-ID: <BANLkTi=LRCmSSYGX-zyB7Eqm_Z4Za0wSgA@mail.gmail.com> (raw)
In-Reply-To: <20110416203023.575C1AE18B@tobiano.tor.corp.google.com>

Geez, working on too many different branches.  This is *not* a pph patch.

On Sat, Apr 16, 2011 at 16:30, Diego Novillo <dnovillo@google.com> 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.  David, could you
> describe why this change was needed?  Will you be submitting for
> trunk?
>
> Tested on x86_64.  Committed to google/main.
>
>
> Diego.
>
> 2011-04-15  Xinliang David Li  <davidxl@google.com>
>
>        Google ref 43787.
>
>        * include/backward/hashtable.h
>        (_Hashtable_iterator::_Hashtable_iterator): Initialize _M_cur and
>        _M_ht in default constructor.
>
> diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/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
>       _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
>       : _M_cur(__n), _M_ht(__tab) { }
>
> -      _Hashtable_iterator() { }
> +      _Hashtable_iterator()
> +      : _M_cur(0), _M_ht(0) { }
>
>       reference
>       operator*() const
>
> --
> This patch is available for review at http://codereview.appspot.com/4430051
>

      reply	other threads:[~2011-04-16 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-16 22:42 [pph] " Diego Novillo
2011-04-16 22:46 ` Diego Novillo [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='BANLkTi=LRCmSSYGX-zyB7Eqm_Z4Za0wSgA@mail.gmail.com' \
    --to=dnovillo@google.com \
    --cc=davidxl@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=reply@codereview.appspotmail.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).