This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/3139: DR 184: numeric_limits<bool> problems
- From: bkoz at gcc dot gnu dot org
- To: bkoz at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gdr at codesourcery dot com, kenny dot simpson at gs dot com, theonetruekenny at yahoo dot com
- Date: 28 Mar 2002 23:11:45 -0000
- Subject: Re: libstdc++/3139: DR 184: numeric_limits<bool> problems
- Reply-to: bkoz at gcc dot gnu dot org, bkoz at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gdr at codesourcery dot com, kenny dot simpson at gs dot com, theonetruekenny at yahoo dot com, gcc-gnats at gcc dot gnu dot org
Synopsis: DR 184: numeric_limits<bool> problems
State-Changed-From-To: analyzed->feedback
State-Changed-By: bkoz
State-Changed-When: Thu Mar 28 15:11:44 2002
State-Changed-Why:
AAaaaagh. Gaby, this is is off. Can you confirm this is ok?
2002-03-28 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.
Index: 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/03/28 23:10:46
***************
*** 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
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3139