Note that this has nothing to do with Operator Priority .. () and ++ , Undefined behavior and sequence points , Why are these constructs (using ++) undefined behavior? and hundreds of similar questions about it here south>
In the near future : is there associativity guaranteed by the standard?
Detailed example : from Wikipedia, the article for operator priority, operator* and operator/ have the same priority, and they are Left-to-right operators. Does this mean that the standard guarantees that it:
int res = x / y * z / t;
will be rated as
int res = ( ( x / y ) * z ) / t;
or implementation defined?
If this were guaranteed, could you quote?
Itβs just out of curiosity, I always write brackets in these cases.
Ready to delete the question, if there is one.
source share