public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/114838] New: __gthread_cond_t et. al. used unconditionally by std_mutex.h
@ 2024-04-24 17:10 pexu@gcc-bugzilla.mail.kapsi.fi
2024-04-24 18:55 ` [Bug libstdc++/114838] " redi at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: pexu@gcc-bugzilla.mail.kapsi.fi @ 2024-04-24 17:10 UTC (permalink / raw)
To: gcc-bugs
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: pexu@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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/114838] __gthread_cond_t et. al. used unconditionally by std_mutex.h
2024-04-24 17:10 [Bug libstdc++/114838] New: __gthread_cond_t et. al. used unconditionally by std_mutex.h pexu@gcc-bugzilla.mail.kapsi.fi
@ 2024-04-24 18:55 ` redi at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2024-04-24 18:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114838
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It's guarded with _GLIBCXX_HAS_GTHREADS which is defined by configure when
__GTHREADS_CXX0X is defined by <gthr.h>, which for gthr-win32.h means:
#if _WIN32_WINNT >= 0x0600
#define __GTHREAD_HAS_COND 1
#define __GTHREADS_CXX0X 1
#endif
So libstdc++ assumes that __GTHREADS_CXX0X is fixed at build-time, not
something that changes from one compilation to the next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-24 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 17:10 [Bug libstdc++/114838] New: __gthread_cond_t et. al. used unconditionally by std_mutex.h pexu@gcc-bugzilla.mail.kapsi.fi
2024-04-24 18:55 ` [Bug libstdc++/114838] " 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).