The order-of-evaluation, order-of-operations, and evaluation-order synonyms are falsely linking to operator-precedence. They should instead be synonyms for order-of-execution.
I believe the status quo started with this request: Merge tags [order-of-operations], [order-of-evaluation], and [operator-precedence]
Technical explanation: distinction between operator precedence and order of execution
It may not be entirely obvious, so let me elaborate on the terminology.
In an expression such as a() + b() + c()
:
Operator precedence tells us that this is grouped as
(a() + b()) + c()
. However, the precedence in itself does not specify whethera()
,b()
, orc()
are executed first. In some languages, there is a left-to-right evaluation guarantee. However, in C and C++, this is not the case, anda()
,b()
, andc()
can be invoked in an arbitrary order by the compiler.Order of execution is the overarching concept, although it does not dictate which operations are executed in the first place. It not only includes the fact that the addition of
a()
andb()
has to happen prior to the addition withc()
, but also includes in what order the functions are invoked.
As a rule of thumb:
Operator precedence states which operations take place, and order of execution states in what order all the operations occur. These two concepts somewhat intersect though.
Therefore, the order-of-evaluation and evaluation-order are falsely equated with "operator precedence" through the current synonym.
Intuitive linguistic explanation
Even ignoring all the technical aspects, it makes very little sense why order-of-evaluation is not a synonym for order-of-execution, since "evaluation" and "execution" are basically the same thing.
Practical Issues
An unsuspecting user may be asking a C++ question such as this:
Is the order of initialization guaranteed for globals?
Is the order in which global variable initializers are evaluated guaranteed?
int x = 1; // global variable int y = x + 1; // is this guaranteed to be 2?
The poor fool would have inadvertently tagged their question as operator-precedence despite not asking about operator precedence at all.
In practice, it looks like virtually all uses of operator-precedence use this tag, and not one of its synonyms. If there is a way to get specific numbers for how many questions would be affected, I would appreciate some advice.
Conclusion
It would be more appropriate to turn the tags in question into a synonym for order-of-execution.