https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108326

            Bug ID: 108326
           Summary: Question about definitions in c++config.h for gcc13
                    20221229
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lukaszcz18 at wp dot pl
  Target Milestone: ---

Amateur questions
I know that creating exe files two years ago with <thread>, <mutex> with
_GLIBCXX_HAS_GTHREADS definition was impossible.
I don't know if someone made mistake or added additional functions in
c++confic.h, but gcc works differently.
Differences between versions 20221124 and 20221219.
/* Defined if sleep exists. */
/* #undef _GLIBCXX_HAVE_SLEEP */
/* Defined if service exists. */
/* #undef _GLIBCXX_HAVE_USLEEP */
/* Define if writev is available in <sys/uio.h>. */
/* Define if gthreads library is available. */
#define _GLIBCXX_HAS_GTHREADS 1
/* Defined if sched_yield is available. */
#define _GLIBCXX_USE_SCHED_YIELD 1
/* Defined if Sleep exists. */
#define _GLIBCXX_USE_WIN32_SLEEP 1
/* Define to 1 if a verbose library is built, or 0 otherwise. */
/* Define if a non-default location should be used for tzdata files. */
/* #undef _GLIBCXX_ZONEINFO_DIR */
/* Define to 1 if mutex_timedlock is available. */
#define_GTHREAD_USE_MUTEX_TIMEDLOCK 0

The question is.
Why is _GLIBCXX_HAS_GTHREADS enabled only for C++20 and above in <thread>?

Reply via email to