[Bug c++/19199] [3.3/3.4/4.0 Regression] Wrong warning about returning a reference to a temporary

mmitchel at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 7 08:09:00 GMT 2005


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-01-07 08:08 -------
Roger, this is a middle-end problem in fond_cond_expr_with_comparision; that is
the routine which makes the invalid transformation.  (It has a similar bug for
MAX_EXPR.)  If the result of the COND_EXPR is an lvalue, I do not believe this
transformation is safe.  As we have no language-independent means of testing
lvalue-ness, I'm not sure that there's a straightforward fix.

Would you care to take a look at this issue?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at eyesopen dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19199



More information about the Gcc-bugs mailing list