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 inconsistent with gcc
- From: "gdr at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Feb 2012 13:36:59 +0000
- Subject: [Bug libstdc++/22200] numeric_limits<signed>::is_modulo is inconsistent with gcc
- Auto-submitted: auto-generated
- References: <bug-22200-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200
Gabriel Dos Reis <gdr at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu.org
--- Comment #41 from Gabriel Dos Reis <gdr at gcc dot gnu.org> 2012-02-29 13:36:59 UTC ---
(In reply to comment #40)
> I haven't seen it mentioned in the discussion here, but in C++11, the
> definition of is_modulo was clarified as:
>
> "True if the type is modulo. A type is modulo if, for any operation involving
> +, -, or * on values of that type whose result would fall outside the range
> [min(),max()], the value returned differs from the true value by an integer
> multiple of max() - min() + 1."
>
> Do people have objections to switching numeric_limits<signed>::is_modulo to
> false (setting it to true when -fwrapv is used can still be discussed
> afterwards)?
I agree with this. Thanks, Marc.