This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]