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.

Reply via email to