>>86
How could something with file scope (i.e. a global variable) not have static duration?
>>88
Strange example. Just cast
foo to type int. It's well defined as long as the int can represent the integral part of the float. I don't actually know whether int* to float* and vice-versa is actually undefined. I just know that if they're incompatible in a sense that they're not correctly aligned, the behaviour is undefined. Logic tells me it should be fine (refer to what I first said).
If
x is signed, I believe it would be optimized out whether the compiler knows its value or not, because an overflow can occur (undefined behaviour), so either way you're fucked. If it was unsigned, on the other hand, the compiler shouldn't optimize it out.