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

            Bug ID: 114838
           Summary: __gthread_cond_t et. al. used unconditionally by
                    std_mutex.h
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: p...@gcc-bugzilla.mail.kapsi.fi
  Target Milestone: ---

Hi.

libstdc++/include/bits/std_mutex.h, which is included by <mutex>, currently
uses internal condition variable types __gthread_cond_t et. al.
unconditionally.  

However, these types might be unavailable.

For an example, libgcc/config/i386/gthr-win32.h (i.e. Windows targets) only
defines these (and __GTHREAD_HAS_COND) if _WIN32_WINNT >= 0x0600. 
Unfortunately, it is possible, that _WIN32_WINNT is set by default to a lower
value.  Such is the case with gdb and it uses 0x0501 by default.

As of writing, both 0x0501 (Windows XP, EOL 2014) and 0x0600 (Windows Vista,
EOL 2017) have been out of support for a number of years.

This issue is also present on GCC 13.

Reply via email to