diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f405e757874..ae3865987895 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-25 Eric Botcazou + + * fold-const.c (fold): Treat MAX_EXPR and MIN_EXPR like + comparisons with regard to signedness. + 2004-02-25 Richard Earnshaw * arm.c (thumb_legitimize_address): New function. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index eaefe0200050..2b2e874062bd 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5423,7 +5423,10 @@ fold (tree expr) if (op == 0) continue; /* Valid for CALL_EXPR, at least. */ - if (kind == '<' || code == RSHIFT_EXPR) + if (kind == '<' + || code == MAX_EXPR + || code == MIN_EXPR + || code == RSHIFT_EXPR) { /* Signedness matters here. Perhaps we can refine this later. */