This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/22200] New: numeric_limits<signed>::is_modulo is inconsistend with gcc
- From: "veksler at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2005 15:19:13 -0000
- Subject: [Bug libstdc++/22200] New: numeric_limits<signed>::is_modulo is inconsistend with gcc
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC does not have a proper modulo overflow semantics for signed
integral types.
1. The loop optimizer seems to assume that signed overflow does
not happen (or is undefined).
2. On x86 INT_MAX/-1 seems to trap (instead of implementing
modulo semantics).
In that case numeric_limits<signed>:is_modulo should be synchronized
with gcc and be set to false instead of true.
Another option, is to change gcc to fully support the modulo
arithmetics of signed integer.
--
Summary: numeric_limits<signed>::is_modulo is inconsistend with
gcc
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: veksler at il dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200