Test results:
PellesC v 5: 482 482
PellesC v 6: 0 482 no optimize
PellesC v 6: 5 482 max speed
PellesC v 6: 5 482 min size
Open Watcom C 32 v 2.0b1: 482 482
Digital Mars C v 8.52: 482 482
#include <stdio.h>
int main(int argc, char **argv)
{
int datedays1, datedays2, year, month;
datedays1 = datedays2 = 0;
year = 2010;
month = 8;
datedays1 = datedays1 + (year >> 2) - ((3 * (year / 100 + 1)) >> 2) - ((int)(month * 0.4 + 2.3));
{
datedays2 += year >> 2;
datedays2 -= (3 * (year / 100 + 1)) >> 2;
datedays2 -= (int)(month * 0.4 + 2.3);
}
#ifdef __POCC__
printf("PellesC: %d %d\n", datedays1, datedays2);
#elif __WATCOMC__
printf("Open Watcom C: %d %d\n", datedays1, datedays2);
#elif __DMC__
printf("Digital Mars C: %d %d\n", datedays1, datedays2);
#endif
return 0;
}