mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-12 00:50:30 +08:00
x
From-SVN: r14210
This commit is contained in:
parent
a112a4d6ac
commit
88a5cdb87f
@ -5498,14 +5498,21 @@ fold (expr)
|
|||||||
return pedantic_non_lvalue (convert (type, arg1));
|
return pedantic_non_lvalue (convert (type, arg1));
|
||||||
case LE_EXPR:
|
case LE_EXPR:
|
||||||
case LT_EXPR:
|
case LT_EXPR:
|
||||||
return pedantic_non_lvalue
|
/* In C++ a ?: expression can be an lvalue, so we can't
|
||||||
(convert (type, (fold (build (MIN_EXPR, comp_type,
|
do this; we would lose the distinction between
|
||||||
comp_op0, comp_op1)))));
|
LT and LE. */
|
||||||
|
if (pedantic_lvalues)
|
||||||
|
return pedantic_non_lvalue
|
||||||
|
(convert (type, (fold (build (MIN_EXPR, comp_type,
|
||||||
|
comp_op0, comp_op1)))));
|
||||||
|
break;
|
||||||
case GE_EXPR:
|
case GE_EXPR:
|
||||||
case GT_EXPR:
|
case GT_EXPR:
|
||||||
return pedantic_non_lvalue
|
if (pedantic_lvalues)
|
||||||
(convert (type, fold (build (MAX_EXPR, comp_type,
|
return pedantic_non_lvalue
|
||||||
comp_op0, comp_op1))));
|
(convert (type, fold (build (MAX_EXPR, comp_type,
|
||||||
|
comp_op0, comp_op1))));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user