Suppose I have this code:
int main(void)
{
int i = rand();
if (++i) ++i;
return i;
}
Is the behavior defined here? I know that it i = ++iis undefined, and the second line in maincontains a similar thing. The challenge rand()is to stop the compiler from optimizing what, in my opinion, is the breaking line.
source
share