public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libstdc++/103638] New: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds @ 2021-12-09 20:22 redi at gcc dot gnu.org 2021-12-10 0:27 ` [Bug libstdc++/103638] " pinskia at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: redi at gcc dot gnu.org @ 2021-12-09 20:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638 Bug ID: 103638 Summary: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds Product: gcc Version: 11.2.1 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- bits/atomic_timed_wait.h:144: error: '__condvar' was not declared in this scope bits/atomic_timed_wait.h:144: error: '__cv' was not declared in this scope bits/atomic_timed_wait.h:144: error: 'mutex' was not declared in this scope bits/atomic_timed_wait.h:144: error: '__mx' was not declared in this scope bits/atomic_timed_wait.h:145: error: expected primary-expression before 'const' bits/atomic_timed_wait.h:145: error: expected primary-expression before '>' token bits/atomic_timed_wait.h:145: error: '__atime' was not declared in this scope bits/atomic_timed_wait.h:145: error: expression list treated as compound expression in initializer [-fpermissive] bits/atomic_timed_wait.h:145: error: expected ';' before '{' token bits/atomic_timed_wait.h:171: error: '__condvar' was not declared in this scope bits/atomic_timed_wait.h:171: error: '__cv' was not declared in this scope bits/atomic_timed_wait.h:171: error: 'mutex' was not declared in this scope bits/atomic_timed_wait.h:171: error: '__mx' was not declared in this scope bits/atomic_timed_wait.h:172: error: expected primary-expression before 'const' bits/atomic_timed_wait.h:172: error: expected primary-expression before '>' token bits/atomic_timed_wait.h:172: error: '__atime' was not declared in this scope bits/atomic_timed_wait.h:172: error: expression list treated as compound expression in initializer [-fpermissive] bits/atomic_timed_wait.h:172: error: expected ';' before '{' token The timed wait implementation needs to be conditional on _GLIBCXX_HAS_GTHREADS. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/103638] [11/12 Regression] #include <atomic> gives errors for --disable-threads builds 2021-12-09 20:22 [Bug libstdc++/103638] New: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds redi at gcc dot gnu.org @ 2021-12-10 0:27 ` pinskia at gcc dot gnu.org 2021-12-10 14:05 ` cvs-commit at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-12-10 0:27 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |11.3 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/103638] [11/12 Regression] #include <atomic> gives errors for --disable-threads builds 2021-12-09 20:22 [Bug libstdc++/103638] New: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds redi at gcc dot gnu.org 2021-12-10 0:27 ` [Bug libstdc++/103638] " pinskia at gcc dot gnu.org @ 2021-12-10 14:05 ` cvs-commit at gcc dot gnu.org 2021-12-10 14:14 ` [Bug libstdc++/103638] [11 " redi at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-12-10 14:05 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638 --- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:ffb632517fc446474baba10ee2ff13a218ec2c7b commit r12-5895-gffb632517fc446474baba10ee2ff13a218ec2c7b Author: Jonathan Wakely <jwakely@redhat.com> Date: Fri Dec 10 11:44:29 2021 +0000 libstdc++: Guard mutex and condvar with gthreads macro [PR103638] A mutex and condition variable is used for timed waits on atomics if there is no "platform wait" (e.g. futex) supported. But the use of those types wasn't guarded by the _GLIBCXX_HAS_GTHREADS macro, causing errors for --disable-threads builds. This fix allows <atomic> to work on targets with futexes but no gthreads. libstdc++-v3/ChangeLog: PR libstdc++/103638 * include/bits/atomic_timed_wait.h: Check _GLIBCXX_HAS_GTHREADS before using std::mutex and std::__condvar. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/103638] [11 Regression] #include <atomic> gives errors for --disable-threads builds 2021-12-09 20:22 [Bug libstdc++/103638] New: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds redi at gcc dot gnu.org 2021-12-10 0:27 ` [Bug libstdc++/103638] " pinskia at gcc dot gnu.org 2021-12-10 14:05 ` cvs-commit at gcc dot gnu.org @ 2021-12-10 14:14 ` redi at gcc dot gnu.org 2022-04-07 10:07 ` rguenth at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: redi at gcc dot gnu.org @ 2021-12-10 14:14 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Summary|[11/12 Regression] #include |[11 Regression] #include |<atomic> gives errors for |<atomic> gives errors for |--disable-threads builds |--disable-threads builds Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2021-12-10 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed on trunk so far. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/103638] [11 Regression] #include <atomic> gives errors for --disable-threads builds 2021-12-09 20:22 [Bug libstdc++/103638] New: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds redi at gcc dot gnu.org ` (2 preceding siblings ...) 2021-12-10 14:14 ` [Bug libstdc++/103638] [11 " redi at gcc dot gnu.org @ 2022-04-07 10:07 ` rguenth at gcc dot gnu.org 2022-04-12 20:18 ` cvs-commit at gcc dot gnu.org 2022-04-12 20:18 ` redi at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2022-04-07 10:07 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/103638] [11 Regression] #include <atomic> gives errors for --disable-threads builds 2021-12-09 20:22 [Bug libstdc++/103638] New: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds redi at gcc dot gnu.org ` (3 preceding siblings ...) 2022-04-07 10:07 ` rguenth at gcc dot gnu.org @ 2022-04-12 20:18 ` cvs-commit at gcc dot gnu.org 2022-04-12 20:18 ` redi at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2022-04-12 20:18 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:105f1c08369aa6702d070f911dd658b93230ac46 commit r11-9833-g105f1c08369aa6702d070f911dd658b93230ac46 Author: Jonathan Wakely <jwakely@redhat.com> Date: Fri Dec 10 11:44:29 2021 +0000 libstdc++: Guard mutex and condvar with gthreads macro [PR103638] A mutex and condition variable is used for timed waits on atomics if there is no "platform wait" (e.g. futex) supported. But the use of those types wasn't guarded by the _GLIBCXX_HAS_GTHREADS macro, causing errors for --disable-threads builds. This fix allows <atomic> to work on targets with futexes but no gthreads. libstdc++-v3/ChangeLog: PR libstdc++/103638 * include/bits/atomic_timed_wait.h: Check _GLIBCXX_HAS_GTHREADS before using std::mutex and std::__condvar. (cherry picked from commit ffb632517fc446474baba10ee2ff13a218ec2c7b) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/103638] [11 Regression] #include <atomic> gives errors for --disable-threads builds 2021-12-09 20:22 [Bug libstdc++/103638] New: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds redi at gcc dot gnu.org ` (4 preceding siblings ...) 2022-04-12 20:18 ` cvs-commit at gcc dot gnu.org @ 2022-04-12 20:18 ` redi at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: redi at gcc dot gnu.org @ 2022-04-12 20:18 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed for 11.3 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-04-12 20:18 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-12-09 20:22 [Bug libstdc++/103638] New: [11/12 Regression] #include <atomic> gives errors for --disable-threads builds redi at gcc dot gnu.org 2021-12-10 0:27 ` [Bug libstdc++/103638] " pinskia at gcc dot gnu.org 2021-12-10 14:05 ` cvs-commit at gcc dot gnu.org 2021-12-10 14:14 ` [Bug libstdc++/103638] [11 " redi at gcc dot gnu.org 2022-04-07 10:07 ` rguenth at gcc dot gnu.org 2022-04-12 20:18 ` cvs-commit at gcc dot gnu.org 2022-04-12 20:18 ` redi at gcc dot gnu.org
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).