Should of course be:

int compare2(uint x, int y)
{
   return (x > int.max) ? 1 : (cast(int)x - y);
}

Reply via email to