public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Giuliano Belinassi <giulianob@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc(refs/users/giulianob/heads/autopar_rebase2)] libstdc++: Fix failing tests for AIX
Date: Tue, 18 Aug 2020 01:37:01 +0000 (GMT)	[thread overview]
Message-ID: <20200818013701.6E86F3944410@sourceware.org> (raw)

https://gcc.gnu.org/g:e417c0659fb82fabe1bd75849caa617f9a3407c0

commit e417c0659fb82fabe1bd75849caa617f9a3407c0
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Aug 11 16:16:22 2020 +0100

    libstdc++: Fix failing tests for AIX
    
    These two tests fail on AIX because <sys/thread.h> 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 <thread>
 
+namespace __gnu_test
+{
 using std::is_constructible;
 using std::thread;
 
@@ -28,3 +30,4 @@ static_assert(!is_constructible<thread, thread, int>::value, "");
 static_assert(!is_constructible<thread, thread&, int>::value, "");
 static_assert(!is_constructible<thread, const thread&, int>::value, "");
 static_assert(!is_constructible<thread, const thread&&, int>::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 <thread>
 
+namespace __gnu_test
+{
 using std::thread;
 using std::is_constructible;
 
 static_assert( !is_constructible<thread, thread&>::value, "" );
 static_assert( !is_constructible<thread, const thread&>::value, "" );
 static_assert( !is_constructible<thread, const thread>::value, "" );
+}


                 reply	other threads:[~2020-08-18  1:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200818013701.6E86F3944410@sourceware.org \
    --to=giulianob@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).