public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Ellcey, Steve" <Steve.Ellcey@cavium.com>
To: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: glibc test tst-thread_local1.cc fails to compile with latest GCC
Date: Wed, 19 Oct 2016 17:45:00 -0000	[thread overview]
Message-ID: <SN2PR0701MB1071127508DE3F0D1174CF3AF5D20@SN2PR0701MB1071.namprd07.prod.outlook.com> (raw)

I have built the latest glibc sources with a ToT GCC and am trying to run the glibc testsuite now.  I ran into a couple of
new warnings that I fixed (locally) and am now looking at nptl/tst-thread_local1.cc which dies with:

tst-thread_local1.cc:172:7: error: ‘thread’ is not a member of ‘std’
       std::thread thr{[func] {func (nullptr);}};

Does anyone know what is going on here?  If I compile a small test program:

#include <thread>
int main(int, char **){
    std::thread tt;
}

With G++ 5.4 (using -std=c++11) this test program compiles. but with ToT GCC, it dies with:

g++ -std=c++11 thread.cc -lpthread -o x
thread.cc: In function ‘int main(int, char**)’:
thread.cc:5:5: error: ‘thread’ is not a member of ‘std’
     std::thread tt;
     ^~~
thread.cc:5:5: note: suggested alternative: ‘fread’
     std::thread tt;
     ^~~
     fread


Is there some C++ standard change that I am not aware of or some other header file I need to include?

Steve Ellcey

             reply	other threads:[~2016-10-19 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 17:45 Ellcey, Steve [this message]
2016-10-19 17:51 ` Andrew Pinski
2016-10-21 16:03 ` Jonathan Wakely
2016-10-21 16:07   ` Steve Ellcey

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=SN2PR0701MB1071127508DE3F0D1174CF3AF5D20@SN2PR0701MB1071.namprd07.prod.outlook.com \
    --to=steve.ellcey@cavium.com \
    --cc=gcc@gcc.gnu.org \
    --cc=libc-alpha@sourceware.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).