From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id 0812138537BC; Fri, 16 Dec 2022 21:24:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0812138537BC Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gdcproject.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gdcproject.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4NYhtf4FW0z9sQh; Fri, 16 Dec 2022 22:24:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gdcproject.org; s=MBO0001; t=1671225850; h=from:from:reply-to:subject:subject: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=XIh5M5cGHl9NlB8TKtu/QKAeD99r/85RlTv2SreM/zg=; b=XvJjCDRzFDIrcfFWNhhv9BGpdM8PjiIbTgIqDeQcdO3POyskCmc+w9UIyERf3C2ScXAc9V s/O44wDjh3dpW0NbE4EioZl5ATbsLesbD39B1KS/iiEVIYe+HT1MB8kdK84x4arPhykey2 30fCvPYhlyXFN8mmYP2ZP2WY679SsRfsnjacxhJ/daWBJ90IekYQ04uJaCKetySHXm+lGw 0WqAtjKEWTfl5b+TVJJD3RebobbiF8tjhEfFtMXe6vqlHXvyp/8xiN1Redj9CnQOa5Wd5x HLRep/fqz0NeDfRfhmE+668FH3MhK+VRgExDKRBDT4X1ERk17gHjzveJwE57Xw== Date: Fri, 16 Dec 2022 22:24:06 +0100 From: Iain Buclaw Subject: Re: Add '-Wno-complain-wrong-lang', and use it in 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere (was: Make '-frust-incomplete-and-experimental-compiler-do-not-use' a 'Common' option) To: gcc-patches@gcc.gnu.org, Jakub Jelinek , joseph@codesourcery.com, Thomas Schwinge Cc: Arthur Cohen , gcc-rust@gcc.gnu.org, =?iso-8859-1?q?Richard=0A?= Biener References: <9d59ae0f-048f-dc32-6309-c8134467bbb7@embecosm.com> <87pmcla8yz.fsf@euler.schwinge.homeip.net> <87len97z4d.fsf@dem-tschwing-1.ger.mentorg.com> <1671103907.a1qdw95wgj.astroid@pulse.none> <87mt7o90du.fsf@euler.schwinge.homeip.net> <87h6xv8mnv.fsf@dem-tschwing-1.ger.mentorg.com> In-Reply-To: <87h6xv8mnv.fsf@dem-tschwing-1.ger.mentorg.com> MIME-Version: 1.0 Message-Id: <1671225114.go3ca7mze4.astroid@pulse.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP 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: Excerpts from Thomas Schwinge's message of Dezember 16, 2022 3:10 pm: >=20 > In the test suites, a number of existing test cases explicitly match the > "command-line option [...] is valid for [...] but not for [...]" > diagnostic with 'dg-warning'; I've left those alone. On the other hand, > I've changed 'dg-prune-output' of this diagnostic into > '-Wno-complain-wrong-lang' usage. I'm happy to adjust that in either way > anyone may prefer. I've not looked for test cases that just to silence > this diagnostic use more general 'dg-prune-output', 'dg-excess-errors', > '-w', etc. >=20 > In the GCC/D test suite, I see a number of: >=20 > cc1plus: warning: command-line option '-fpreview=3Din' is valid for D= but not for C++ >=20 > cc1plus: warning: command-line option '-fextern-std=3Dc++11' is valid= for D but not for C++ >=20 > It's not clear to me how they, despite this, do achieve > 'PASS: [...] (test for excess errors)'? Maybe I haven't found where that > gets pruned/ignored? >=20 There's an implicit dg-prune-output inserted by the gdc-convert-test proc. As the only tests that mix C++ and D sources is the runnable_cxx part of the testsuite, I can add the flag to the D2 testsuite scripts later just for those tests. Iain.