Does anyone know of any platforms supported by the C standard, for which there is still active development work, but which are:
It should be noted that you cannot rely on undefined behaviour even on commonly used platforms, because modern optimizing compilers perform program transformations that only preserve defined behaviour.
In particular, you cannot rely on two's complement arithmetic giving you INT_MAX+1 == INT_MIN
. For example, gcc 4.6.0 optimizes the following into an infinite loop:
#include <stdio.h>
int main() {
int i = 0;
while (i++ >= 0)
puts(".");
return 0;
}
EDIT: See here for more on signed overflow and GCC optimizations.