From: Paolo Carlini Date: Thu, 7 Jan 2010 17:20:45 +0000 (+0000) Subject: locale_facets_nonio.tcc (time_put<>::do_put): Avoid pointless __builtin_alloca use. X-Git-Tag: releases/gcc-4.5.0~1354 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3095eb8e4c7e9b01caf12d71ead8aababcc9ab68;p=thirdparty%2Fgcc.git locale_facets_nonio.tcc (time_put<>::do_put): Avoid pointless __builtin_alloca use. 2010-01-07 Paolo Carlini * include/bits/locale_facets_nonio.tcc (time_put<>::do_put): Avoid pointless __builtin_alloca use. From-SVN: r155697 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index cb10263e0bd3..6c765650965b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2010-01-07 Paolo Carlini + + * include/bits/locale_facets_nonio.tcc (time_put<>::do_put): Avoid + pointless __builtin_alloca use. + 2010-01-06 Paolo Carlini PR libstdc++/26701 diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc index e788457e2abe..48a913901e75 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc +++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc @@ -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(__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