This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug c++/19199] [3.3/3.4/4.0/4.1 Regression] Wrong warning about returning a reference to a temporary
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Tue, 8 Mar 2005 03:47:45 -0800
- Subject: Re: [Bug c++/19199] [3.3/3.4/4.0/4.1 Regression] Wrong warning about returning a reference to a temporary
- References: <20050308024940.GA28816@redhat.com> <Pine.LNX.4.44.0503072003400.5693-100000@www.eyesopen.com>
On Mon, Mar 07, 2005 at 08:29:48PM -0700, Roger Sayle wrote:
> Which docs?! There's currently *no* documentation for MIN_EXPR
> or MAX_EXPR in c-tree.texi.
Ah, I misremembered the docs for the rtl patterns.
Signed minimum and maximum operations. When used with floating point,
if both operands are zeros, or if either operand is @code{NaN}, then
it is unspecified which of the two operands is returned as the result.
But I think the tree patterns should be the same.
> 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.
r~