From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1059) id 0FFE73894C18; Thu, 27 Aug 2020 18:06:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FFE73894C18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598551599; bh=cl2ftPrjOhVYb1dspBk4qwV2C9hlUS30PJCq9jCky2A=; h=From:To:Subject:Date:From; b=E85LIaFR01Xv5y7Xlry51zTdi16Yy1GK/VuJm5hZlUP0xVLzTaZYZCS9E7CARaB0j sHrDk1pAZny7wnQq9Tm8whfw4L44ZthQRfgCe+QwVqyLMnlBicQr1I49L77C0jcrEZ 5mLGnVXclhbTrXbuLBORKMI+PFk/r/5ywOoRD+Do= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Nathan Sidwell To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/c++-modules] libstdc++: Fix failing tests for AIX X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/devel/c++-modules X-Git-Oldrev: 18095be17013444d9e91aa8c73ebe5cf58ccb3f1 X-Git-Newrev: fe8d7fec4db838cae536eeef1965db83959cf6ee Message-Id: <20200827180639.0FFE73894C18@sourceware.org> Date: Thu, 27 Aug 2020 18:06:39 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 18:06:39 -0000 https://gcc.gnu.org/g:fe8d7fec4db838cae536eeef1965db83959cf6ee commit fe8d7fec4db838cae536eeef1965db83959cf6ee Author: Jonathan Wakely Date: Tue Aug 11 16:16:22 2020 +0100 libstdc++: Fix failing tests for AIX These two tests fail on AIX because defines struct thread in the global namespace (despite it not being a reserved name). That means the using-declaration that adds it to the global namespace causes a redeclaration error. libstdc++-v3/ChangeLog: * testsuite/30_threads/thread/cons/84535.cc: Use a custom namespace. * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise. Diff: --- libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc | 3 +++ libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc index 7846d3f7b68..711687b4f5c 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc @@ -20,6 +20,8 @@ #include +namespace __gnu_test +{ using std::is_constructible; using std::thread; @@ -28,3 +30,4 @@ static_assert(!is_constructible::value, ""); static_assert(!is_constructible::value, ""); static_assert(!is_constructible::value, ""); static_assert(!is_constructible::value, ""); +} diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc index e0d588e51f9..1ad2a76cb58 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc @@ -20,9 +20,12 @@ #include +namespace __gnu_test +{ using std::thread; using std::is_constructible; static_assert( !is_constructible::value, "" ); static_assert( !is_constructible::value, "" ); static_assert( !is_constructible::value, "" ); +}