This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Counter-PATCH (libstdc++-v3, mainline) for: std::_Atomic_swapfor i386
- From: Andreas Schwab <schwab at suse dot de>
- To: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org,danny_r_smith_2001 at yahoo dot co dot nz
- Date: Tue, 06 May 2003 14:05:18 +0200
- Subject: Re: Counter-PATCH (libstdc++-v3, mainline) for: std::_Atomic_swapfor i386
- References: <200305031018.h43AIg3t027074@latour.rsch.comm.mot.com>
Loren James Rittle <rittle@latour.rsch.comm.mot.com> writes:
|> Index: include/ext/stl_rope.h
|> ===================================================================
|> RCS file: /cvs/gcc/gcc/libstdc++-v3/include/ext/stl_rope.h,v
|> retrieving revision 1.19
|> diff -c -r1.19 stl_rope.h
|> *** include/ext/stl_rope.h 16 Jan 2003 20:30:26 -0000 1.19
|> --- include/ext/stl_rope.h 3 May 2003 10:12:15 -0000
|> ***************
|> *** 483,488 ****
|> --- 483,489 ----
|> bool _M_is_balanced:8;
|> unsigned char _M_depth;
|> __GC_CONST _CharT* _M_c_string;
|> + __gthread_mutex_t _M_c_string_lock;
|> /* Flattened version of string, if needed. */
|> /* typically 0. */
|> /* If it's not 0, then the memory is owned */
|> ***************
|> *** 498,504 ****
|> --- 499,510 ----
|> _Refcount_Base(1),
|> # endif
|> _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0)
|> + #ifdef __GTHREAD_MUTEX_INIT
|> + , _M_c_string_lock (__GTHREAD_MUTEX_INIT)
|> { }
|> + #else
|> + { __GTHREAD_MUTEX_INIT_FUNCTION (&_M_c_string_lock); }
|> + #endif
Breaks bootstrap on ia64-linux. You can't use __GTHREAD_MUTEX_INIT like
this, it is only usable as a static initializer.
In file included from /tmp/cvs/gcc-20030506/Build/ia64-suse-linux/libstdc++-v3/include/ext/rope:60,
from ../../../../libstdc++-v3/src/ext-inst.cc:34:
/tmp/cvs/gcc-20030506/Build/ia64-suse-linux/libstdc++-v3/include/ext/stl_rope.h: In
constructor `__gnu_cxx::_Rope_RopeRep<_CharT,
_Alloc>::_Rope_RopeRep(__gnu_cxx::_Rope_RopeRep<_CharT, _Alloc>::_Tag, int,
bool, long unsigned int, typename __gnu_cxx::_Rope_rep_base<_CharT,
_Alloc>::allocator_type)':
/tmp/cvs/gcc-20030506/Build/ia64-suse-linux/libstdc++-v3/include/ext/stl_rope.h:503: error: expected
primary-expression
/tmp/cvs/gcc-20030506/Build/ia64-suse-linux/libstdc++-v3/include/ext/stl_rope.h:503: error: expected
`)'
/tmp/cvs/gcc-20030506/Build/ia64-suse-linux/libstdc++-v3/include/ext/stl_rope.h:503: error: expected
primary-expression
/tmp/cvs/gcc-20030506/Build/ia64-suse-linux/libstdc++-v3/include/ext/stl_rope.h:503: error: expected
`;'
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."