From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7D4E3385B524; Mon, 28 Nov 2022 15:58:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D4E3385B524 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669651109; bh=MTKx3uWE3qWdvqlUrVBFH5k0itkUfg11qvTFzGoO3FQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=URDOCrtAF5JrDh7rRglUyaggPbTwmlUFAx5Q7DZdepB5ZRZUNuiyPJhAHiYJYxZoZ mff1uxYKcOQTKFzbEg1T7nuyqyDzSPw9HQGEq+o+v1W83C6QGKAx8EhUjGNMD3fCRZ xMZyuedVhBJgzAhVgOGw2MAyBVIOpcJ1s4lT5BOM= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107886] Problem witch std::latch, std::binary_semaphores in C++20 Date: Mon, 28 Nov 2022 15:58:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.3.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107886 --- Comment #13 from Jonathan Wakely --- (In reply to Jamaika from comment #6) > I don't understand something. Why _GLIBCXX_HAS_GTHREADS works for > std::jthread but not for std::latch std::jthread doesn't depend on _GLIBCXX_HAS_GTHREADS, it's always available. But you might not be able to create a new thread using std::jthread if your platform doesn't provide what's needed for it to work. (In reply to Jamaika from comment #10) > ``` > Using built-in specs. > COLLECT_GCC=3Dg++.exe > Target: x86_64-w64-mingw32 > Configured with: /home/ma/m/source/gcc-g/configure --host=3Dx86_64-w64-mi= ngw32 > --target=3Dx86_64-w64-mingw32 --disable-nls > --enable-languages=3Dc,c++,objc,obj-c++ --with-gmp=3D/home/ma/m/build/for= _target > --with-mpfr=3D/home/ma/m/build/for_target > --with-mpc=3D/home/ma/m/build/for_target > --with-isl=3D/home/ma/m/build/for_target --enable-twoprocess > --disable-libstdcxx-pch --disable-win32-registry --disable-shared > --enable-fully-dynamic-string --enable-libssp --prefix=3D/home/ma/m/target > --with-sysroot=3D/home/ma/m/target > Thread model: win32 This is the problem. You need a thread model that provides the support need= ed for C++.=