This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/16850] modulo - feature or bug?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]