From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by sourceware.org (Postfix) with ESMTPS id B5CFC38308D3; Thu, 15 Dec 2022 11:39:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B5CFC38308D3 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 smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (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-201.mailbox.org (Postfix) with ESMTPS id 4NXqyq2Ypcz9sbr; Thu, 15 Dec 2022 12:39:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gdcproject.org; s=MBO0001; t=1671104387; 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=FngKbHn/21M0iE6QWXjNUrOuaCoBQUrFwZGpQAVT5zk=; b=MrTGnmWVNzGmQaaP9r9ejAd+MSIHbgkjASrBupWeJEKFUdzjAdCC8m1j8pIznIlAjdYwqr 2OHPGiHMhpof2ZBdbuc/oYB2bEByPdW/3exW0O6geJUO57JfZ4sZI4VPO/W7gTWIFjijXB FCdGfxs2+SuE8CENWDyUziAbX7vkWdD7WghOe53LZtrh4gtVMFx9BRTBfLsshonVn6VR8g y3mnTCQUqXZMcA5ndMxdKexq8oRBv9HT7LfbBdc5WXABf/tE0bgdQzNvnL7ZtGhGBCxRPQ maflPk51wCledxHqcZMeW5Kg5MA+x5xQLIbRcUpN2EGGgNBWE8dwGWsizP0VpA== Date: Thu, 15 Dec 2022 12:39:38 +0100 From: Iain Buclaw Subject: Re: Make '-frust-incomplete-and-experimental-compiler-do-not-use' a 'Common' option (was: Rust front-end patches v4) To: Jakub Jelinek , Thomas Schwinge Cc: Arthur Cohen , gcc-patches@gcc.gnu.org, gcc-rust@gcc.gnu.org, joseph@codesourcery.com, Richard Biener References: <20221206101417.778807-1-arthur.cohen@embecosm.com> <9d59ae0f-048f-dc32-6309-c8134467bbb7@embecosm.com> <87pmcla8yz.fsf@euler.schwinge.homeip.net> <87len97z4d.fsf@dem-tschwing-1.ger.mentorg.com> In-Reply-To: MIME-Version: 1.0 Message-Id: <1671103907.a1qdw95wgj.astroid@pulse.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4NXqyq2Ypcz9sbr X-Spam-Status: No, score=-7.8 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 Jakub Jelinek via Gcc-patches's message of Dezember 15, 2022 = 12:16 pm: > We seem to have a problem in other testsuites too: > grep ' valid for .*but not for' */*.log | sort -u > gcc/gcc.log:/home/jakub/src/gcc/gcc/testsuite/gcc.dg/pragma-diag-6.c:2:30= : warning: option '-Wnoexcept' is valid for C++/ObjC++ but not for C [-Wpra= gmas] > gdc/gdc.log:cc1plus: warning: command-line option '-fextern-std=3Dc++11' = is valid for D but not for C++ > gdc/gdc.log:cc1plus: warning: command-line option '-fpreview=3Din' is val= id for D but not for C++ > gfortran/gfortran.log:cc1: warning: command-line option '-fcheck=3Dall' i= s valid for Fortran but not for C > g++/g++.log:cc1: warning: command-line option '-nostdinc++' is valid for = C++/ObjC++ but not for C > g++/g++.log:cc1: warning: command-line option '-std=3Dgnu++11' is valid f= or C++/ObjC++ but not for C > g++/g++.log:cc1: warning: command-line option '-std=3Dgnu++14' is valid f= or C++/ObjC++ but not for C > g++/g++.log:cc1: warning: command-line option '-std=3Dgnu++17' is valid f= or C++/ObjC++ but not for C > g++/g++.log:cc1: warning: command-line option '-std=3Dgnu++20' is valid f= or C++/ObjC++ but not for C > g++/g++.log:cc1: warning: command-line option '-std=3Dgnu++23' is valid f= or C++/ObjC++ but not for C > g++/g++.log:cc1: warning: command-line option '-std=3Dgnu++98' is valid f= or C++/ObjC++ but not for C > rust/rust.log:cc1plus: warning: command-line option '-frust-incomplete-an= d-experimental-compiler-do-not-use' is valid for Rust but not for C++ > rust/rust.log:cc1: warning: command-line option '-frust-incomplete-and-ex= perimental-compiler-do-not-use' is valid for Rust but not for C > (of course, some of them could be from tests that this valid for but not = for > messages work right, that is clearly the case of pragma-diag-6.c). >=20 > In gcc/testsuite/lib/target-supports.exp (check_compile) we already > determine extension for the check_compile snippet based on magic comments > with default to .c (Rust nor Modula 2 don't have any, should that be > changed?), shouldn't we at that point based on the language filter out > known options that will not work? >=20 > So, given the above, at least when in gdc testsuite and language is > not D filter out -fextern-std=3D* and -fpreview=3Din, for gfortran testsu= ite > and language not Fortran filter out -fcheck=3Dall, when in g++ testsuite = and > language is not C++ filter out -nostdinc++, -std=3Dgnu++* and when > in rust testsuite and language is not Rust filter out > -frust-incomplete-and-experimental-compiler-do-not-use ? >=20 For the gdc testsuite, those warnings arise because both language files are compiled in the same invocation (dg-additional-sources "cpp11.cpp"), so it ends up looking something like: gdc -fextern-std=3Dc++11 testcpp11.d cpp11.cpp -o testcpp11.exe So ruling out some sort of filtering done by the gdc driver when delegating calls to the C/C++/D language compilers, is there a way to get dejagnu to compile dg-additional-sources one-at-a-time? Iain.