[cc65] mod operator (signed int, unsigned int)

From: marcas <marcas1chello.at>
Date: 2010-12-09 23:02:33
Hi,

I think I found a failing testcase for mod operations:

#include <stdlib.h>
#include <stdio.h>

int main(void) {

     int tmp;

     for (tmp = 0; tmp<=1000; tmp++)
         if (!(tmp%1000)) printf("%d mod 1000 is %d\n", tmp, tmp%1000);

     return EXIT_SUCCESS;
}


results in  (vice x64)
0 mod 1000 is 0
232 mod 1000 is 0
1000 mod 1000 is 0

Kind regards marcas

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Dec 9 23:02:40 2010

This archive was generated by hypermail 2.1.8 : 2010-12-09 23:02:43 CET