GCC Bugzilla has been upgraded from version 4.4.9 to 5.0rc3. If you see any problem, please report it to bug 64968.
View | Details | Raw Unified | Return to bug 40518 | Differences between
and this patch

Collapse All | Expand All

(-)include/bits/basic_string.h (-6 / +11 lines)
Lines 197-208 Link Here
197
197
198
	void
198
	void
199
	_M_set_length_and_sharable(size_type __n)
199
	_M_set_length_and_sharable(size_type __n)
200
	{ 
200
	{
201
	  this->_M_set_sharable();  // One reference.
201
#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
202
	  this->_M_length = __n;
202
	  if (__builtin_expect(this != &_S_empty_rep(), false))
203
	  traits_type::assign(this->_M_refdata()[__n], _S_terminal);
203
#endif
204
	  // grrr. (per 21.3.4)
204
	    {
205
	  // You cannot leave those LWG people alone for a second.
205
	      this->_M_set_sharable();  // One reference.
206
	      this->_M_length = __n;
207
	      traits_type::assign(this->_M_refdata()[__n], _S_terminal);
208
	      // grrr. (per 21.3.4)
209
	      // You cannot leave those LWG people alone for a second.
210
	    }
206
	}
211
	}
207
212
208
	_CharT*
213
	_CharT*

Return to bug 40518