This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR37795
On Mon, 13 Oct 2008, Paolo Bonzini wrote:
> > + if (!(t = combine_comparisons (TRUTH_AND_EXPR, code1, code2,
> TRUTH_ANDIF_EXPR, and likewise below. The difference being...
> /* In a short-circuited boolean expression the LHS might be
> such that the RHS, if evaluated, will never trap. For
> example, in ORD (x, y) && (x < y), we evaluate the RHS only
> if neither x nor y is NaN. (This is a mixed blessing: for
> example, the expression above will never trap, hence
> optimizing it to x < y would be invalid). */
> /* If the comparison was short-circuited, and only the RHS
> trapped, we may now generate a spurious trap. */
You are right. Thanks for noticing.