> Yes, I know, but I would nevertheless prefer (0 / x) to do the same
> thing as (y / x) when both x and y are zero at run time. That
> potentially depends on the target architecture.
To explain a bit better what I mean: On a particular architecture I
would like each of the following programs to do the same thing when
invoked with no arguments, which isn't required by any standard that I
know of, but it's nice to have and easy to achieve.
#include <stdio.h>
int main(int argc, char *argv[])
{
int a = argc >> 1 & 127;
int b = argc >> 8 & 127
printf("%d\n", a / b);
return 0;
}
#include <stdio.h>
int main(int argc, char *argv[])
{
int a = argc >> 1 & 127;
int b = argc >> 8 & 127
printf("%d\n", a / 0);
return 0;
}
#include <stdio.h>
int main(int argc, char *argv[])
{
int a = argc >> 1 & 127;
int b = argc >> 8 & 127;
printf("%d\n", 0 / 0);
return 0;
}
What those programs do does, of course, depend on the architecture.
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel