I want to know on what criterias,gcc compiler decides to optimize the values of variables.? Here is sample
int a=2;
printf("%d %d\n",a++,++a);
It gives output
3 4
Why does gcc optimizes and gives latest value of a
in pre-increment and not in post increment?On which basis it takes decision?