------- Comment #2 from igodard at pacbell dot net 2010-08-28 04:11 ------- "No it must be evaluated as if it was: operator|=(a, f())"
Exactly. The arguments (a and f()) must be evaluated to their parameter types (bool& and bool) before the call to |=. There *is* a sequence point; it's the call of |=, and the compiler is not permitted to move the side effect of f() into the body of |=, nor is it permitted to dereference "a" before the call. To quote Wikipedia: "A sequence point in C or C++ is ... Before a function is entered in a function call. The order in which the arguments are evaluated is not specified, but this sequence point means that all of their side effects are complete before the function is entered." citing 1998 standard section 1.9, paragraphs 1618. Please consult your colleagues on this. -- igodard at pacbell dot net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45437