[Bug libstdc++/22200] numeric_limits<signed>::is_modulo is inconsistent with gcc

marc.glisse at normalesup dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 29 12:41:00 GMT 2012


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)?



More information about the Gcc-bugs mailing list