From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id B983D388A435; Tue, 20 Apr 2021 18:53:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B983D388A435 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 r9-9381] libstdc++: Fix failing tests for AIX X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-9 X-Git-Oldrev: fc075ad624f837107edd8f75898adfcdf96bf69b X-Git-Newrev: 9f5c8ec3d175fdf5d6616992db8778cfba72da63 Message-Id: <20210420185320.B983D388A435@sourceware.org> Date: Tue, 20 Apr 2021 18:53:20 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 18:53:20 -0000 https://gcc.gnu.org/g:9f5c8ec3d175fdf5d6616992db8778cfba72da63 commit r9-9381-g9f5c8ec3d175fdf5d6616992db8778cfba72da63 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. (cherry picked from commit fe8d7fec4db838cae536eeef1965db83959cf6ee) 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 66c2aded22b..6c60763008b 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 4a540dcc9b4..86c990af5e0 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, "" ); +}