diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-01-12 10:40:49 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-01-13 13:34:20 +0000 |
commit | e2fc12a5dafadf15d804e1d2541528296e97a847 (patch) | |
tree | e4d9e046e730a5a3b7ebb417d85ae1fa772c5c9f /gcc/gimple-array-bounds.cc | |
parent | 57d104ab0f515d12ba12270a415a76f55c235574 (diff) | |
download | gcc-e2fc12a5dafadf15d804e1d2541528296e97a847.zip gcc-e2fc12a5dafadf15d804e1d2541528296e97a847.tar.gz gcc-e2fc12a5dafadf15d804e1d2541528296e97a847.tar.bz2 |
libstdc++: Fix unintended layout change to std::basic_filebuf [PR108331]
GCC 13 has a new implementation of gthr-win32.h which supports C++11
mutexes, threads etc. but this causes an unintended ABI break. The
__gthread_mutex_t type is always used in std::basic_filebuf even in
C++98, so independent of whether C++11 sync primitives work or not.
Because that type changed for the win32 thread model, we have a layout
change in std::basic_filebuf. The member is completely unused, it just
gets passed to the std::__basic_file constructor and ignored. So we
don't need that mutex to actually work, we just need its layout to not
change.
Introduce a new __gthr_win32_legacy_mutex_t struct in gthr-win32.h with
the old layout, and conditionally use that in std::basic_filebuf.
PR libstdc++/108331
libgcc/ChangeLog:
* config/i386/gthr-win32.h (__gthr_win32_legacy_mutex_t): New
struct matching the previous __gthread_mutex_t struct.
(__GTHREAD_LEGACY_MUTEX_T): Define.
libstdc++-v3/ChangeLog:
* config/io/c_io_stdio.h (__c_lock): Define as a typedef for
__GTHREAD_LEGACY_MUTEX_T if defined.
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions