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: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Feb 2012 12:32:10 +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
Marc Glisse <marc.glisse at normalesup dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marc.glisse at normalesup
| |dot org
--- Comment #40 from Marc Glisse <marc.glisse at normalesup dot org> 2012-02-29 12:32:10 UTC ---
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)?