From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121014 invoked by alias); 11 Jul 2018 02:25:38 -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 99286 invoked by uid 89); 11 Jul 2018 02:25:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=2014, cc1plus, H*M:62e4, 49 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Jul 2018 02:25:10 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 543F71E48F; Tue, 10 Jul 2018 22:25:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=simark.ca; s=mail; t=1531275900; bh=CWStOMpp1A7s7qwH+6L/AtLfWq6vYNve4TN9mzSG7iU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=GjNMRlTX+OCbfLIYBDrS1QolzSQZFWVXj3CfM8K8YnNSi5kYkRqqMEvn+aKEmORI9 dtjDlE9EVdjrh6hKDy1yPKETl/TFJjmKNUme02mXCneNLRaHTAvF9ZjotynobQXbMF J+QoGbkp/aCVf5uqYukuArjTUZsDsaUBm10MiSTM= Subject: Re: [RFA] Remove VEC from breakpoint To: Tom Tromey Cc: Andrew Burgess , gdb-patches@sourceware.org References: <20180605192316.5423-1-tom@tromey.com> <20180703143301.GA2675@embecosm.com> <65452ba0-5ff9-bdc6-ce43-164777e9407c@simark.ca> <87h8lfpnkc.fsf@tromey.com> <878t6qq58b.fsf@tromey.com> <87efgdqcby.fsf@tromey.com> <87a7r1qbs3.fsf@tromey.com> From: Simon Marchi Message-ID: <9589e1bf-479b-b11f-62e4-e7a491664326@simark.ca> Date: Wed, 11 Jul 2018 02:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <87a7r1qbs3.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-07/txt/msg00292.txt.bz2 On 2018-07-09 12:21 AM, Tom Tromey wrote: > Tom> I'm going to take another attempt at it, using a hack to get the > Tom> configure logging output into the file that's visible in buildbot, > Tom> since I didn't see a way to fetch the config.log. > > That didn't take long: > > https://gdb-build.sergiodj.net/builders/Debian-s390x-native-gdbserver-m64/builds/5859/steps/compile%20gdb/logs/stdio > > I don't know what is going on here, but basically the test case passes > fine in configure, but causes problems in the build. > > configure's test is: > > struct Bar { virtual ~Bar() {} }; Bar getbar(); > int > main () > { > const Bar& b = getbar(); > ; > return 0; > } > > But the real code is: > > scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid); > > If you have any ideas, I'd appreciate it. Perhaps it's really some > different bug. This only seems to affect the s390 builders. > > Tom > Hi Tom, I reduced the case to this: struct scoped_restore_base {}; struct scoped_restore_tmpl : public scoped_restore_base { ~scoped_restore_tmpl() {} }; void func() { const scoped_restore_base & save_inferior_ptid = scoped_restore_tmpl(); } The type of "save_inferior_ptid" seems important. If it's a reference to the child class, we don't get the warning with g++ 4.9. So your configure test would need to have that. g++ 4.9 is available in Debian 8, which you can easily run in a docker container. root@9305ed73237c:/gdb/gdb# g++ --version g++ (Debian 4.9.2-10+deb8u1) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. root@9305ed73237c:/gdb/gdb# g++ -std=gnu++11 -Werror -c -o repro.o -Wunused-variable repro2.cpp repro2.cpp: In function 'void func()': repro2.cpp:8:31: error: unused variable 'save_inferior_ptid' [-Werror=unused-variable] const scoped_restore_base & save_inferior_ptid = scoped_restore_tmpl(); ^ cc1plus: all warnings being treated as errors Simon