From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128337 invoked by alias); 22 Sep 2017 15:47:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 128321 invoked by uid 89); 22 Sep 2017 15:47:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Sep 2017 15:47:42 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 02745C00DB98; Fri, 22 Sep 2017 15:47:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 02745C00DB98 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id C4A295D9CA; Fri, 22 Sep 2017 15:47:39 +0000 (UTC) Subject: Re: [RFA] Remove make_cleanup_restore_target_terminal To: Tom Tromey References: <20170920160404.20543-1-tom@tromey.com> <313985bd-111f-cea6-7b13-96217ee450cc@redhat.com> <87bmm5nhsw.fsf@tromey.com> <77e364fe-e0b9-de94-b6dd-ce759ee7400c@redhat.com> <87vakc6nph.fsf@tromey.com> Cc: Simon Marchi , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <8aa86061-a9a4-ba62-4c0e-9608225191b3@redhat.com> Date: Fri, 22 Sep 2017 15:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <87vakc6nph.fsf@tromey.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-09/txt/msg00681.txt.bz2 On 09/21/2017 05:06 PM, Tom Tromey wrote: > Simon> Clang gives this warning, which seems valid to me: > > Sorry about this. > > Pedro> Indeed. The field should be a scoped_restore_tmpl instead of > Pedro> a scoped_restore, and that mem-initializer above should be > Pedro> calling the scoped_restore_tmpl ctor instead of make_scoped_restore. > > How's the appended? > > commit c068483d29873c3bc80c8accc3f50cecae0f33d8 > Author: Tom Tromey > Date: Thu Sep 21 09:54:25 2017 -0600 > > Change type of scoped_input_handler::m_quit_handler > > Simon pointed out that scoped_input_handler::m_quit_handler must have > the correct scoped_restore_tmpl type, to avoid binding to a temporary. > This patch fixes the problem. > > gdb/ChangeLog > 2017-09-21 Tom Tromey > > * utils.c (class scoped_input_handler) : Change > type to scoped_restore_tmpl. > : Initialize m_quit_handler directly. Reviewed-by: Pedro Alves Thanks, Pedro Alves