From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D9D5385B53C; Fri, 17 Feb 2023 15:27:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D9D5385B53C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676647632; bh=g/4q10ApYpu2q0J89TjWNT927Bvxxtq+yXrXRJCgVIc=; h=From:To:Subject:Date:From; b=OWM5rSddGa2TWmDDMtJ8x9n7aQZFIN6NliliSuxVpA56qszGc3GoN3dicICEHopoc bknTpjXw5/2+26Y7EGmY0j1jFLR+R1T0OdmDP+XHuch3KqfzFICD4zH5vpEVE9mHzX p3242c9uxHU+cfsxfeI3WUqMBzn/q9mnrXkdwAjc= From: "pdimov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108836] New: std::mutex disappears in single-threaded libstdc++ builds Date: Fri, 17 Feb 2023 15:27:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pdimov at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D108836 Bug ID: 108836 Summary: std::mutex disappears in single-threaded libstdc++ builds Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: pdimov at gmail dot com Target Milestone: --- We've been getting reports in Boost that our uses of and std::mutex don't work in a single-threaded build of libstdc++, so we had to add configuration macros to avoid these issues. One example is https://github.com/boostorg/system/commit/53c00841fc0d892bf43cda60e3ea2f05c= 4362b32, another https://github.com/boostorg/url/issues/684. Is there a reason not to make std::mutex available in single threaded build= s, with its operations being no-ops?=