diff options
Diffstat (limited to 'gcc/cp/typeck.cc')
-rw-r--r-- | gcc/cp/typeck.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc index e5a52dc2b39..5f16994300f 100644 --- a/gcc/cp/typeck.cc +++ b/gcc/cp/typeck.cc @@ -5501,6 +5501,7 @@ cp_build_binary_op (const op_location_t &location, if (!TYPE_P (type1)) type1 = TREE_TYPE (type1); if (type0 + && type1 && INDIRECT_TYPE_P (type0) && same_type_p (TREE_TYPE (type0), type1)) { @@ -10650,8 +10651,7 @@ maybe_warn_about_returning_address_of_local (tree retval, location_t loc) && !(TREE_STATIC (whats_returned) || TREE_PUBLIC (whats_returned))) { - if (VAR_P (whats_returned) - && DECL_DECOMPOSITION_P (whats_returned) + if (DECL_DECOMPOSITION_P (whats_returned) && DECL_DECOMP_BASE (whats_returned) && DECL_HAS_VALUE_EXPR_P (whats_returned)) { |