From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 93A3E3857006 for ; Wed, 3 May 2023 15:11:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 93A3E3857006 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: by gnu.wildebeest.org (Postfix, from userid 1000) id A043A302BB02; Wed, 3 May 2023 17:11:27 +0200 (CEST) Date: Wed, 3 May 2023 17:11:27 +0200 From: Mark Wielaard To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Pass const frame_info_ptr reference for skip_[language_]trampoline Message-ID: <20230503151127.GE19114@gnu.wildebeest.org> References: <20230502183444.1445634-1-mark@klomp.org> <87wn1ptqow.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wn1ptqow.fsf@tromey.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-3030.3 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, May 03, 2023 at 08:50:07AM -0600, Tom Tromey wrote: > >>>>> "Mark" == Mark Wielaard writes: > > Mark> It isn't clear why only in this one place g++ sees the issue (probably > Mark> because it can inlined enough code in this specific case). > > s/inlined/inline/ > > Could you add a "Bug:" trailer with a link to the bugzilla entry? Fixed typo and added Bug link. PR build/30413 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30413 > Anyway, other than that nit, this looks ok to me. It's a little > unfortunate we don't know why exactly this particular spot warns, but on > the other hand, the fix is harmless (actually an improvement) and we've > worked around plenty of compiler oddities before. > > Reviewed-By: Tom Tromey Thanks, pushed with that added. So that the code compiles again. In the bug Tom de Vries has some ideas to "fix" this more generically by changing the frame_info_ptr destructor to give the compiler even more visibility into what is happening, which might help prevent similar issues in the future if you don't want to change a pass by value by a pass by reference. Cheers, Mark