diff mbox

obvious(?) typo in libstdc++-v3/src/c++98/locale.cc

Message ID 201202152009.q1FK96bD010829@greed.delorie.com
State New
Headers show

Commit Message

DJ Delorie Feb. 15, 2012, 8:09 p.m. UTC
The typo is obvious, but whether or not the wrapped code still works
isn't (to me).

	* src/c++98/locale.cc (locale::facet::_S_get_c_locale): Fix typo.

Comments

Benjamin Kosnik Feb. 15, 2012, 8:18 p.m. UTC | #1
> The typo is obvious, but whether or not the wrapped code still works
> isn't (to me).
> 
> 	* src/c++98/locale.cc (locale::facet::_S_get_c_locale): Fix
> typo.

Please check this in.

-benjamin
DJ Delorie Feb. 15, 2012, 9:34 p.m. UTC | #2
> > The typo is obvious, but whether or not the wrapped code still works
> > isn't (to me).
> > 
> > 	* src/c++98/locale.cc (locale::facet::_S_get_c_locale): Fix
> > typo.
> 
> Please check this in.

Done.  Thanks!
Jonathan Wakely Feb. 17, 2012, 10:28 a.m. UTC | #3
On 15 February 2012 20:09, DJ Delorie wrote:
>
> The typo is obvious, but whether or not the wrapped code still works
> isn't (to me).
>
>        * src/c++98/locale.cc (locale::facet::_S_get_c_locale): Fix typo.

I must have looked at that code dozens of times and never seen it!  :-\

I wonder if that's the cause of occasional locale-related segfaults
that get reported, such as:
http://gcc.gnu.org/ml/gcc-help/2011-06/msg00114.html
I can't find other right now, but I know I've looked through that file
a few times when mysterious crashes have been reproted.

We might want to consider applying to all open branches after it's
been on trunk for a while.
diff mbox

Patch

Index: libstdc++-v3/src/c++98/locale.cc
===================================================================
--- libstdc++-v3/src/c++98/locale.cc	(revision 183469)
+++ libstdc++-v3/src/c++98/locale.cc	(working copy)
@@ -203,13 +203,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     _S_create_c_locale(_S_c_locale, _S_c_name);
   }
 
   __c_locale
   locale::facet::_S_get_c_locale()
   {
-#ifdef __GHTREADS
+#ifdef __GTHREADS
     if (__gthread_active_p())
       __gthread_once(&_S_once, _S_initialize_once);
     else
 #endif
       {
 	if (!_S_c_locale)