Web lists-archives.com

Re: [ANNOUNCEMENT] Updated: gcc-6.3.0-2 (x86/x86_64)(Test)

On 7/27/2017 5:39 PM, Ross Smith wrote:
On 2017-07-28 09:19, Marco Atzeri wrote:
On 27/07/2017 23:04, Ross Smith wrote:

gcc 6.3 works fine for me unless I use threads. Any C++ program that
uses std::thread (and worked with the previous gcc) will fail. Simple

    #include <iostream>
    #include <thread>
    void payload() {
        std::cout << "Thread\n";
    int main() {
        std::cout << "Start\n";
        std::thread t(payload);
        std::cout << "Done\n";

Build and run with:

    g++ thread.cpp -o thread && ./thread || echo Fail

This will print Fail, indicating that the executable errored out.
There's no other output. Sorry, I'm not familiar enough with gcc
debugging to narrow down the error further.

Code that uses raw pthreads instead of the C++ API works fine.

(I'm running 64-bit Cygwin on Windows 8.1.)

Ross Smith

it works for me on W7-64

./thread || echo "fail"

$ g++ --version
g++ (GCC) 6.3.0

That's interesting. Maybe I have something wrong with my installation? I updated the gcc-core, gcc-g++, and libgcc1 packages to the 6.3 test version; was there something else I needed? (I found those by searching the installed package list in the Cygwin installer for gcc or g++, and seeing which ones offered the option of updating to 6.3; there doesn't seem to be any way of checking what you actually need in a case like this.)

Click the test button when running setup. You'll see several other packages with versions 6.3.0-2, including libstdc++6.


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple