rondino rondino - 2 months ago 6x
C Question

order of evaluation of comparison operator?

I have learnt that logical operator are guaranteed that their evaluation are from left-to right but I was wondering what are the order of evaluation of comparison operator. For instance

expression1 < expression2
in other words is it guaranteed that
will be first evaluated before


According to the standard:

J.1 Unspecified behavior

The following are unspecified:

— The order in which subexpressions are evaluated and the order in which side effects take place, except as specified for the function-call (), &&, ||, ?:, and comma operators (6.5).