diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2001-12-11 10:48:11 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2001-12-11 10:48:11 -0500 |
commit | 6fe4816fdbdd340a102881e80988198a3c84a9f4 (patch) | |
tree | 88d7999f243355ed50d3eccbd18e7a13d0a24c01 | |
parent | 8d51ecf8a06d682387cdb49aa00daa5c59b3e4eb (diff) | |
download | gcc-6fe4816fdbdd340a102881e80988198a3c84a9f4.zip gcc-6fe4816fdbdd340a102881e80988198a3c84a9f4.tar.gz gcc-6fe4816fdbdd340a102881e80988198a3c84a9f4.tar.bz2 |
locale_facets.tcc (_M_extract_int): Avoid uninitialized warning.
* include/bits/locale_facets.tcc (_M_extract_int): Avoid
uninitialized warning.
From-SVN: r47877
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/locale_facets.tcc | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 81929d9..89d1bec 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2001-12-11 Jason Merrill <jason@redhat.com> + + * include/bits/locale_facets.tcc (_M_extract_int): Avoid + uninitialized warning. + 2001-12-11 Loren Rittle <ljrittle@acm.org> * config/cpu/sparc/sparc32/bits/atomicity.h @@ -22,6 +27,7 @@ * include/bits/locale_facets.h (__num_base::_S_scale_hex): Add. (__num_base::_S_scale_oct): Add. + * include/bits/locale_facets.tcc (_M_extract_int): Use them. * src/locale.cc: Add definitions. * testsuite/27_io/istream_extractor_arith.cc (main): Call test13. diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 5f22cde..e4b40af3 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -303,8 +303,8 @@ namespace std __max_digits = __max; else if (__base == 16) __max_digits = static_cast<int>(ceil(__max * _S_scale_hex)); - else if (__base == 8) - __max_digits = static_cast<int>(ceil(__max * _S_scale_oct)); + else /* if (__base == 8) */ + __max_digits = static_cast<int>(ceil(__max * _S_scale_oct)); // Add in what's already been extracted. __max_digits += __pos; |