Should this code fragment compile under (1) pcc (2) an ANSI compiler?
int x;
switch (x)
{
case (int) 1:
printf ("1\n");
break;
case (int) 2:
printf ("2\n");
break;
}
At least one compiler here rejects this, saying the case does not reduce
to a constant expression. In fact, I suspect the general problem is
``is (int) constant a constant?''
ian