From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 8E9433858D28 for ; Wed, 3 May 2023 18:07:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E9433858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C004320606; Wed, 3 May 2023 18:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683137276; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Irpx19zpsbVrqJMe7TG0StWbLNC/2CdGG9sXdQ9pH9Q=; b=0z3T7GBid4TYMQSbA1C0uYqXc7JdHTGHTDjmuGSPW8qMjgRgXFHngjP1/DDm8SsTgaFr+v W0bM0fRYj8FQIWVKGamq2RNRW3aKT+V5R/2CaMo5yW0pv3z3HBmnUSv9bArvKp5URkmL0g 5Qk0dJvpd+tKVxXXUxOpWrxfq5WFBoM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683137276; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Irpx19zpsbVrqJMe7TG0StWbLNC/2CdGG9sXdQ9pH9Q=; b=0fLQwFsmBqs8LZ7LQIEv737EPetVtvBH7lxnEfDaRF5MCZuVXbs1C/iqkaBcBU9TuCJj40 mUitXdO8n4mpcsCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A8DD813584; Wed, 3 May 2023 18:07:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1p0kKPyiUmSYNwAAMHmgww (envelope-from ); Wed, 03 May 2023 18:07:56 +0000 Message-ID: <872d854d-9eb1-d028-38a5-b7d010af309d@suse.de> Date: Wed, 3 May 2023 20:07:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH] Pass const frame_info_ptr reference for skip_[language_]trampoline To: Mark Wielaard , Tom Tromey Cc: gdb-patches@sourceware.org References: <20230502183444.1445634-1-mark@klomp.org> <87wn1ptqow.fsf@tromey.com> <20230503151127.GE19114@gnu.wildebeest.org> Content-Language: en-US From: Tom de Vries In-Reply-To: <20230503151127.GE19114@gnu.wildebeest.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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 5/3/23 17:11, Mark Wielaard wrote: > 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. > Hi Mark, thanks for fixing this. I've submitted a patch at https://sourceware.org/pipermail/gdb-patches/2023-May/199342.html . Indeed it's not a "fix" for the warning as such. It's more a follow-up on the observation that the code that triggers the warning was introduced for a reason that's no longer valid, so we can just remove it and simplify the code, which then also "fixes" the warning. Thanks, - Tom