debug container mutex association

Jonathan Wakely jwakely@redhat.com
Tue Sep 27 10:32:00 GMT 2016


On 26/09/16 22:36 +0200, François Dumont wrote:
>Fixed with attached patch.
>
>François
>
>
>On 26/09/2016 13:56, Andreas Schwab wrote:
>>FAIL: 23_containers/list/debug/invalidation/4.cc (test for excess errors)
>>Excess errors:
>>/daten/aranym/gcc/gcc-20160926/Build/m68k-linux/libstdc++-v3/include/debug/safe_sequence.tcc:89: error: 'void __gnu_debug::_Safe_iterator_base::_M_detach_single()' is protected within this context
>>/daten/aranym/gcc/gcc-20160926/Build/m68k-linux/libstdc++-v3/include/debug/safe_sequence.tcc:112: error: 'void __gnu_debug::_Safe_iterator_base::_M_detach_single()' is protected within this context
>>
>>Andreas.
>>
>

>Index: include/debug/safe_base.h
>===================================================================
>--- include/debug/safe_base.h	(revision 240509)
>+++ include/debug/safe_base.h	(working copy)
>@@ -121,11 +121,11 @@
>     void
>     _M_detach();
> 
>+  public:
>     /** Likewise, but not thread-safe. */
>     void
>     _M_detach_single() throw ();
> 
>-  public:
>     /** Determines if we are attached to the given sequence. */
>     bool
>     _M_attached_to(const _Safe_sequence_base* __seq) const


Would this be a smaller change, that doesn't make the member
accessible to all code?

--- a/libstdc++-v3/include/debug/safe_base.h
+++ b/libstdc++-v3/include/debug/safe_base.h
@@ -50,6 +50,7 @@ namespace __gnu_debug
   class _Safe_iterator_base
   {
     friend class _Safe_sequence_base;
+    template<typename> friend class _Safe_sequence;
 
   public:
     /** The sequence this iterator references; may be NULL to indicate



More information about the Gcc-patches mailing list