By cppreference/eval_order rule 12 the call to the allocation function (operator new) is sequenced before (since C++17) the evaluation of the constructor arguments in a new-expression. Thus, I thought the following
Bar b;
Foo* f = new Foo(b.fun());
at runtime results in calling new first then fun() on b and lastly the constructor of Foo. Both Clang and ICC produce this order. However GCC calls fun() first, then the operator new and then the constructor.
Who is right? What am I missing?