This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16850] modulo - feature or bug?
- From: "schwab at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Aug 2004 13:50:09 -0000
- Subject: [Bug c/16850] modulo - feature or bug?
- References: <20040801133528.16850.szak@gmx.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schwab at suse dot de 2004-08-01 13:50 -------
This behaviour is mandated by the C standard.
6.5.5 Multiplicative operators
[#6] When integers are divided, the result of the / operator is the algebraic
quotient with any fractional part discarded. If the quotient a/b is
representable, the expression (a/b)*b + a%b shall equal a.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16850