[v3] 3139
Benjamin Kosnik
bkoz@redhat.com
Wed Apr 3 21:31:00 GMT 2002
tested x86/linux
gcc
gcc-3_1-branch
2002-04-03 Benjamin Kosnik <bkoz@redhat.com>
As per DR 184, libstdc++/3139
* include/std/std_limits.h (__glibcpp_bool_digits): Change to 1.
(numeric_limits<bool>::is_iec559): False.
(numeric_limits<bool>::is_modulo): False.
* testsuite/27_io/ios_init.cc: Add instantiations.
Index: include/std/std_limits.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/std/std_limits.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_limits.h
*** std_limits.h 2002/03/08 17:59:12 1.4
--- std_limits.h 2002/04/04 04:57:00
***************
*** 233,243 ****
// bool-specific hooks:
// __glibcpp_bool_digits __glibcpp_int_traps __glibcpp_long_traps
- // This is actually CHAR_BITS because the new ABI says a bool
- // is one (1) byte wide.
-
#ifndef __glibcpp_bool_digits
! #define __glibcpp_bool_digits __glibcpp_char_bits
#endif
// char.
--- 233,240 ----
// bool-specific hooks:
// __glibcpp_bool_digits __glibcpp_int_traps __glibcpp_long_traps
#ifndef __glibcpp_bool_digits
! #define __glibcpp_bool_digits 1
#endif
// char.
*************** namespace std
*** 996,1004 ****
static bool denorm_min() throw()
{ return false; }
! static const bool is_iec559 = true;
static const bool is_bounded = true;
! static const bool is_modulo = true;
// It is not clear what it means for a boolean type to trap.
// This is a DR on the LWG issue list. Here, I use integer
--- 993,1001 ----
static bool denorm_min() throw()
{ return false; }
! static const bool is_iec559 = false;
static const bool is_bounded = true;
! static const bool is_modulo = false;
// It is not clear what it means for a boolean type to trap.
// This is a DR on the LWG issue list. Here, I use integer
Index: testsuite/27_io/ios_init.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/ios_init.cc,v
retrieving revision 1.8
diff -c -p -r1.8 ios_init.cc
*** ios_init.cc 2002/04/03 02:32:52 1.8
--- ios_init.cc 2002/04/04 04:57:01
*************** template
*** 215,220 ****
--- 215,228 ----
template
unsigned short
std::basic_string<unsigned short>::_Rep::_S_terminal;
+
+ template
+ std::basic_string<unsigned char>::size_type
+ std::basic_string<unsigned char>::_Rep::_S_max_size;
+
+ template
+ unsigned char
+ std::basic_string<unsigned char>::_Rep::_S_terminal;
#endif
int main()
More information about the Gcc-patches
mailing list