From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Remove make_cleanup_restore_target_terminal
Date: Thu, 21 Sep 2017 13:26:00 -0000 [thread overview]
Message-ID: <77e364fe-e0b9-de94-b6dd-ce759ee7400c@redhat.com> (raw)
In-Reply-To: <fd2d57293a7e49e4e06d1c5e31da6007@polymtl.ca>
On 09/21/2017 02:15 PM, Simon Marchi wrote:
> Clang gives this warning, which seems valid to me:
>
> /home/emaisin/src/binutils-gdb/gdb/utils.c:907:23: error: binding
> reference member 'm_quit_handler' to a temporary value
> [-Werror,-Wdangling-field]
> : m_quit_handler (make_scoped_restore (&quit_handler,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/emaisin/src/binutils-gdb/gdb/utils.c:931:18: note: reference
> member declared here
> scoped_restore m_quit_handler;
> ^
Indeed. The field should be a scoped_restore_tmpl instead of
a scoped_restore, and that mem-initializer above should be
calling the scoped_restore_tmpl ctor instead of make_scoped_restore.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-09-21 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 16:04 Tom Tromey
2017-09-20 16:21 ` Pedro Alves
2017-09-20 22:09 ` Tom Tromey
2017-09-21 13:16 ` Simon Marchi
2017-09-21 13:26 ` Pedro Alves [this message]
2017-09-21 16:06 ` Tom Tromey
2017-09-22 15:47 ` Pedro Alves
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=77e364fe-e0b9-de94-b6dd-ce759ee7400c@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--cc=tom@tromey.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