On Mar 8, 2005, Richard Henderson <[EMAIL PROTECTED]> wrote: >> As has been described earlier on this thread, GCC has folded the C++ >> source "(a >= b ? a : b) = c" into "MAX_EXPR (a,b) = c" and equivalently >> "(a > b ? a : b) = c" into "MAX_EXPR (b,a) = c" since the creation of >> current CVS.
> Which, as we've been seeing in this thread, is also a mistake. Not quite. The folding above is not a mistake at all, if all the expressions are exactly as displayed. The problem occurs when we turn: ((int)a > (int)b ? a : b) = c into (__typeof(a))(MAX_EXPR ((int)a, (int)b)) = c and avoiding this kind of lvalue-dropping transformation is exactly what the patch I proposed fixes. -- Alexandre Oliva http://www.ic.unicamp.br/~oliva/ Red Hat Compiler Engineer [EMAIL PROTECTED], gcc.gnu.org} Free Software Evangelist [EMAIL PROTECTED], gnu.org}