This is the mail archive of the gcc@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]

Re: Modulus by constant


    Consider a / b where b is an odd number, and it is known that b divides a
    (this case occurs in C pointer subtraction).  

Unfortunately, in this case b doesn't divide a because we're doing modulus.

I understand the general principle: I was wondering if anybody knew the
code well because I suspect this is a "corner" case, being unsigned
and having the constant being multiplied by look negative if it were signed.


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