This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: glibc test tst-thread_local1.cc fails to compile with latest GCC
- From: Andrew Pinski <pinskia at gmail dot com>
- To: "Ellcey, Steve" <Steve dot Ellcey at cavium dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 19 Oct 2016 10:51:10 -0700
- Subject: Re: glibc test tst-thread_local1.cc fails to compile with latest GCC
- Authentication-results: sourceware.org; auth=none
- References: <SN2PR0701MB1071127508DE3F0D1174CF3AF5D20@SN2PR0701MB1071.namprd07.prod.outlook.com>
On Wed, Oct 19, 2016 at 10:45 AM, Ellcey, Steve <Steve.Ellcey@cavium.com> wrote:
> 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
I Just tested it with revision 241328 of GCC, it works ...
apinski@apinski-ss1:~/src/local4$ ./tools/bin/g++ t88.cc -std=c++11 -mabi=ilp32
apinski@apinski-ss1:~/src/local4$ ./a.out
Thanks,
Andrew
>
>
> Is there some C++ standard change that I am not aware of or some other header file I need to include?
>
> Steve Ellcey