This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/22200] numeric_limits<signed>::is_modulo is inconsistend with gcc
- From: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2005 18:00:32 -0000
- Subject: [Bug libstdc++/22200] numeric_limits<signed>::is_modulo is inconsistend with gcc
- References: <20050627151911.22200.veksler@il.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schlie at comcast dot net 2005-06-27 18:00 -------
(In reply to comment #13)
> Invalid as the C++ standard says:
> " True if the type is modulo.203) A type is modulo if it is possible to add two positive numbers and
> have a result that wraps around to a third number that is less. Generally, this is false for floating
types,
> true for unsigned integers, and true for signed integers on"
>
> it says "if possible" which means not always but some of the time.
It's only "possible" because the sum of two positive numbers may not exceed that
type's MAX value; not because if a type is modulo it may not produce a modulo result.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200