S
Smart Tag
Consider this:
int i = 7;
i = i++ + 1; // standard says this is undefined behavior
But, according to precedence rules, i = i++ + 1 means i = ((i++) + 1)
i.e, i should be 8. Why does the standard say it's undefined behavior?
int i = 7;
i = i++ + 1; // standard says this is undefined behavior
But, according to precedence rules, i = i++ + 1 means i = ((i++) + 1)
i.e, i should be 8. Why does the standard say it's undefined behavior?