]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
locale_facets_nonio.tcc (time_put<>::do_put): Avoid pointless __builtin_alloca use.
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 7 Jan 2010 17:20:45 +0000 (17:20 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 7 Jan 2010 17:20:45 +0000 (17:20 +0000)
2010-01-07  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/locale_facets_nonio.tcc (time_put<>::do_put): Avoid
pointless __builtin_alloca use.

From-SVN: r155697

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets_nonio.tcc

index cb10263e0bd32e71ea6412b6c4ae3f3916187ffd..6c765650965bdd194ff56198c427ca77c6a1cffa 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/bits/locale_facets_nonio.tcc (time_put<>::do_put): Avoid
+       pointless __builtin_alloca use.
+
 2010-01-06  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR libstdc++/26701
index e788457e2abee2aeb485d8c7430969e70207e775..48a913901e752190b749b07d3857970346e16566 100644 (file)
@@ -1182,8 +1182,7 @@ _GLIBCXX_END_LDBL_NAMESPACE
       // NB: This size is arbitrary. Should this be a data member,
       // initialized at construction?
       const size_t __maxlen = 128;
-      char_type* __res = 
-       static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen));
+      char_type __res[__maxlen];
 
       // NB: In IEE 1003.1-200x, and perhaps other locale models, it
       // is possible that the format character will be longer than one