float stuff again
Loren James Rittle
rittle@latour.rsch.comm.mot.com
Wed Jan 23 08:21:00 GMT 2002
In article <Pine.SOL.3.91.1020122165737.12851A-100000@taarna.cygnus.com>,
Benjamin Kosnik <bkoz@redhat.com> writes:
>> WOW! Never mind, I just did a source update and I see Benjamin has
>> been fixing this issue properly... ;-)
> Not really, but it'll do for now.
> Anyway.
OK, I do see now (that you arranged to properly reuse the
implementation from elsewhere that has the same bug I was attempting
to fix). FYI, trivial bootstrap issue with mainline g++:
c++locale.cc: In function `void std::__convert_to_v(const char*, _T&,
std::_Ios_Iostate&, int* const&, int) [with _T = long double]':
c++locale.cc:171: using `typename' outside of template
[where c++locale.c == config/locale/c_locale_generic.cc]
BTW, yes I do have:
* config/locale/c_locale_generic.cc: Fix.
in my tree already.
I think you must be using an older g++ that allowed typename to appear
in this context. Since mainline bootstrap is broken on non-C99 ports
and I'm fairly sure I remember this being recently tightened in g++,
applied as obvious:
* config/locale/c_locale_generic.cc: Fix typename usage.
Index: libstdc++-v3/config/locale/c_locale_generic.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/locale/c_locale_generic.cc,v
retrieving revision 1.5
diff -c -r1.5 c_locale_generic.cc
*** c_locale_generic.cc 2002/01/23 03:50:49 1.5
--- c_locale_generic.cc 2002/01/23 16:16:07
***************
*** 168,174 ****
if (__sanity != __s && *__sanity == '\0' && errno == 0)
__v = __ld;
#else
! typedef typename char_traits<char>::int_type int_type;
long double __ld;
int __p = sscanf(__s, "%Lf", &__ld);
if (__p && static_cast<int_type>(__p) != char_traits<char>::eof())
--- 168,174 ----
if (__sanity != __s && *__sanity == '\0' && errno == 0)
__v = __ld;
#else
! typedef char_traits<char>::int_type int_type;
long double __ld;
int __p = sscanf(__s, "%Lf", &__ld);
if (__p && static_cast<int_type>(__p) != char_traits<char>::eof())
More information about the Libstdc++
mailing list