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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Same place it's always been defined, in gthr.h which is included by
<ext/concurrence.h>

And every other header includes <bits/c++config.h> i.e. all of these:

#include <exception>           // std::exception
#include <new>                 // std::terminate
#include <cstdlib>             // std::malloc, std::free, std::strtoul
#include <climits>             // INT_MAX
#include <bits/stl_function.h> // std::less
#include "unwind-cxx.h"
#if _GLIBCXX_HOSTED
# include <string_view>        // std::string_view
# include <cstring>            // std::strchr, std::memset
# include <ext/concurrence.h>  // __gnu_cxx::__mutex, __gnu_cxx::__scoped_lock
#endif

That's why I removed the unnecessary initial #include of it.


This should fix it:

--- a/libstdc++-v3/libsupc++/eh_alloc.cc
+++ b/libstdc++-v3/libsupc++/eh_alloc.cc
@@ -236,7 +236,7 @@ namespace

   void *pool::allocate (std::size_t size) noexcept
     {
-      __gnu_cxx::__scoped_lock sentry(emergency_mutex);
+      __scoped_lock sentry(emergency_mutex);
       // We need an additional size_t member plus the padding to
       // ensure proper alignment of data.
       size += offsetof (allocated_entry, data);

Reply via email to