From 6b4e957600594a0f13dc0dfb744dfa9654c34660 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Tue, 13 Jun 2006 19:02:49 +0000 Subject: [PATCH] Check for Objective-C++ in deciding certain COND_EXPR folding. Check for Objective-C++ in deciding certain COND_EXPR folding. OKed by Geoff Keating. From-SVN: r114619 --- gcc/ChangeLog | 5 +++++ gcc/fold-const.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b8a49a4c1d3..4af751eab9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-06-13 Fariborz Jahanian + + * fold-const.c (fold_cond_expr_with_comparison): Check for + Objective-C++ as language in deciding COND_EXPR transformation. + 2006-06-06 J"orn Rennecke PR target/28014: diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 3e9ccbe4f66..5bf3ade27d8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4531,7 +4531,8 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2) /* Avoid these transformations if the COND_EXPR may be used as an lvalue in the C++ front-end. PR c++/19199. */ && (in_gimple_form - || strcmp (lang_hooks.name, "GNU C++") != 0 + || (strcmp (lang_hooks.name, "GNU C++") != 0 + && strcmp (lang_hooks.name, "GNU Objective-C++") != 0) || ! maybe_lvalue_p (arg1) || ! maybe_lvalue_p (arg2))) {