------- Comment #4 from igodard at pacbell dot net 2010-08-28 04:32 -------
Yes, I understand that the comma is not a sequence point, and a may be
evaluated (to a&) in any order w/r/t f() (to bool). But it is not legal to
evaluate a to bool before the call of |=, because |= takes <emp>bool&</emp>,
not <emp>bool</emp>.
If you still don't get my point here please check with someone else. This isn't
the usual side-effect idiocy that you usually get. :-)
Suppose we have:
void g(bool& bref, bool b) { std::cerr << bref << "\n"; }
bool val = false;
bool f(bool& bf) { bf = true; return false; }
g(val, f(val));
you would agree that the language requires that f be called before g and it
prints true because val is never dereferenced as an argument, yes?
--
igodard at pacbell dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45437