This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37015] New: modulo operations which use negative numbers return unexpected results
- From: "cl3m3ns at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2008 20:29:32 -0000
- Subject: [Bug c/37015] New: modulo operations which use negative numbers return unexpected results
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
using negative numbers, like for example
(-1)%4 results in -1 instead of the right result, which is 3
--
Summary: modulo operations which use negative numbers return
unexpected results
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cl3m3ns at gmail dot com
GCC build triplet: 4.3.1
GCC host triplet: 4.3.1
GCC target triplet: 4.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37015