From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 7E1D4382D3C1; Tue, 6 Dec 2022 21:40:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E1D4382D3C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670362841; bh=tCGm2mua58Ch/jAIia1v1LakqYillwUflqh4nrTHWNA=; h=From:To:Subject:Date:From; b=PzYGJv2ZDfpMHtae6RVsORPpywUWQ0gMBMnY1YC7/xBfj445ik/GjpS28XsTRMCDq WdBWNWtCf7GRmaKG5kj4vsRH6g0GFnekr2V3cHOmwvv/BX3MopvXtS/dH9O2Ofhkva SR0BB9RKcYZinBofEaORBpDRLoKc87YmvsYVcNiY= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-4528] libstdc++: Fix test that fails due to name clash with old glibc [PR107979] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 9cce91a63dcc40cb39e68f6a771e891e51c51946 X-Git-Newrev: 2a23b93f944fa78d4284eb5687051c224e5ab08f Message-Id: <20221206214041.7E1D4382D3C1@sourceware.org> Date: Tue, 6 Dec 2022 21:40:41 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2a23b93f944fa78d4284eb5687051c224e5ab08f commit r13-4528-g2a23b93f944fa78d4284eb5687051c224e5ab08f Author: Jonathan Wakely Date: Mon Dec 5 21:44:26 2022 +0000 libstdc++: Fix test that fails due to name clash with old glibc [PR107979] This test was recently modified to check that the library doesn't use __unused anywhere, because that's a macro in newlib. But it's also a macro in old versions of glibc, so the test now fails for those targets. Disable that check for those targets as well as for newlib. libstdc++-v3/ChangeLog: PR libstdc++/107979 * testsuite/17_intro/names.cc: Do not check __unused on old Glibc versions. Diff: --- libstdc++-v3/testsuite/17_intro/names.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index ffbb199797b..963f74c11f3 100644 --- a/libstdc++-v3/testsuite/17_intro/names.cc +++ b/libstdc++-v3/testsuite/17_intro/names.cc @@ -241,6 +241,13 @@ #undef y #endif +#ifdef __GLIBC_PREREQ +#if ! __GLIBC_PREREQ(2, 19) +// Glibc defines this prior to 2.19 +#undef __unused +#endif +#endif + #if __has_include() // newlib's defines these as macros. #undef __lockable