From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 9FE1C3858D1E for ; Tue, 2 May 2023 13:47:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FE1C3858D1E 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-out1.suse.de (Postfix) with ESMTPS id D7C9F21DE4; Tue, 2 May 2023 13:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683035264; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VkEGT7ra0dIT3cAYFV5o0hiTNblyrZSrwlo4MgqVxf4=; b=gYltSr29zfRA1hH2eqWzMX/PHDCcumdvhyiCYuKBbX8pAHU/KXLb68QWlH8JSxlOZ/0H9S hooRpzRlb97/fDFKq8qdTs+08IxnHM4vcDUK4lqAQfMzcoNL6pWP36OeaOW+ZW9Y9EH9xP Xl5FnALsAQ4Nnc7IzE1+ivmvIrs4MXY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683035264; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VkEGT7ra0dIT3cAYFV5o0hiTNblyrZSrwlo4MgqVxf4=; b=Sp6clxQGWxiRxEnjS7nE+5wGgP8DEYhBK/yMAgU+qdu2nY4sctWvwtQTLITeh3xdbVbD29 TnYl6jnKhlgtD+CQ== 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 C523D134FB; Tue, 2 May 2023 13:47:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TTgGL4AUUWRPZwAAMHmgww (envelope-from ); Tue, 02 May 2023 13:47:44 +0000 Message-ID: <5df3f24f-019c-4d19-73c8-d7c6ff811546@suse.de> Date: Tue, 2 May 2023 15:48:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PUSHED] gdb/testsuite: compile gdb.linespec/cp-completion-aliases.exp as C++ Content-Language: en-US To: Andrew Burgess , gdb-patches@sourceware.org References: <4e545e3f3d600e62ed6522e0ed6ef609a6fe8354.1683024857.git.aburgess@redhat.com> From: Tom de Vries In-Reply-To: <4e545e3f3d600e62ed6522e0ed6ef609a6fe8354.1683024857.git.aburgess@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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/2/23 12:54, Andrew Burgess via Gdb-patches wrote: > Noticed in passing that the prepare_for_testing call in > gdb.linespec/cp-completion-aliases.exp does not pass the 'c++' flag, > despite this being a C++ test. > > I guess, as the source file has the '.cc' extension, all the compilers > are doing the right thing anyway -- the source file uses templates, so > is definitely being compiled as C++. > > I noticed this when I tried to set CXX_FOR_TARGET (but not > CC_FOR_TARGET) and spotted that this script was still using the C > compiler. > > Fixed in this commit by adding the 'c++' flag for prepare_for_testing. Hi, this is an instance of https://sourceware.org/bugzilla/show_bug.cgi?id=30380 . I already had this fixed in a branch, but hadn't had time to submit. FWIW, it's the top commit of https://github.com/vries/gdb/commits/testsuite/old-gcc . Thanks, - Tom > --- > gdb/testsuite/gdb.linespec/cp-completion-aliases.exp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp b/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp > index 33ad72e6f05..4c3ab7362e9 100644 > --- a/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp > +++ b/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp > @@ -20,7 +20,7 @@ load_lib completion-support.exp > > standard_testfile .cc > > -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} { > +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { > return -1 > } > > > base-commit: b2499d8a40a6de13e9bc88b973a730bdf8b9b032