]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
typeck.c (build_array_ref, [...]): Consistently forward the tsubst_flags_t parameter.
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 8 Mar 2012 17:44:45 +0000 (17:44 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 8 Mar 2012 17:44:45 +0000 (17:44 +0000)
2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>

* typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
build_ptrmemfunc): Consistently forward the tsubst_flags_t
parameter.
* call.c (resolve_args): Likewise.

From-SVN: r185106

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/typeck.c

index 69677aea99ad4abd8dd7a01512f1ff0584575804..24e629fe8cd86873285394bfb9a5bd6cb90ed46a 100644 (file)
@@ -1,3 +1,10 @@
+2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
+       build_ptrmemfunc): Consistently forward the tsubst_flags_t
+       parameter.
+       * call.c (resolve_args): Likewise.
+
 2012-03-07  Jason Merrill  <jason@redhat.com>
 
        PR c++/52521
index 8baad827f6d7f22221afa48a1aeea0ed79d14da9..0bf3bb187c04e2e8d836393c1f8de33529366846 100644 (file)
@@ -3740,7 +3740,7 @@ resolve_args (VEC(tree,gc) *args, tsubst_flags_t complain)
            error ("invalid use of void expression");
          return NULL;
        }
-      else if (invalid_nonstatic_memfn_p (arg, tf_warning_or_error))
+      else if (invalid_nonstatic_memfn_p (arg, complain))
        return NULL;
     }
   return args;
index ba5ae46814ea540207aae60ae8634595198db32e..643454cf22709986bca57d7f64ca124e1ad691f9 100644 (file)
@@ -2884,7 +2884,7 @@ cp_build_array_ref (location_t loc, tree array, tree idx,
                                   complain),
               cp_build_array_ref (loc, TREE_OPERAND (array, 2), idx,
                                   complain),
-              tf_warning_or_error);
+              complain);
       protected_set_expr_location (ret, loc);
       return ret;
 
@@ -5033,7 +5033,7 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain)
       build_ptrmemfunc_type (argtype);
       val = build_ptrmemfunc (argtype, val, 0,
                              /*c_cast_p=*/false,
-                             tf_warning_or_error);
+                             complain);
     }
 
   return val;
@@ -5781,11 +5781,11 @@ convert_ptrmem (tree type, tree expr, bool allow_inverse_p,
                                     EQ_EXPR,
                                     expr,
                                     build_int_cst (TREE_TYPE (expr), -1),
-                                    tf_warning_or_error);
+                                    complain);
          op1 = build_nop (ptrdiff_type_node, expr);
          op2 = cp_build_binary_op (input_location,
                                    PLUS_EXPR, op1, delta,
-                                   tf_warning_or_error);
+                                   complain);
 
          expr = fold_build3_loc (input_location,
                              COND_EXPR, ptrdiff_type_node, cond, op1, op2);
@@ -7208,7 +7208,7 @@ build_ptrmemfunc (tree type, tree pfn, int force, bool c_cast_p,
            return pfn;
          else if (integer_zerop (n))
            return build_reinterpret_cast (to_type, pfn, 
-                                           tf_warning_or_error);
+                                           complain);
        }
 
       if (TREE_SIDE_EFFECTS (pfn))
@@ -7229,9 +7229,9 @@ build_ptrmemfunc (tree type, tree pfn, int force, bool c_cast_p,
       if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_delta)
        n = cp_build_binary_op (input_location,
                                LSHIFT_EXPR, n, integer_one_node,
-                               tf_warning_or_error);
+                               complain);
       delta = cp_build_binary_op (input_location,
-                                 PLUS_EXPR, delta, n, tf_warning_or_error);
+                                 PLUS_EXPR, delta, n, complain);
       return build_ptrmemfunc1 (to_type, delta, npfn);
     }
 
@@ -7245,7 +7245,7 @@ build_ptrmemfunc (tree type, tree pfn, int force, bool c_cast_p,
     }
 
   if (type_unknown_p (pfn))
-    return instantiate_type (type, pfn, tf_warning_or_error);
+    return instantiate_type (type, pfn, complain);
 
   fn = TREE_OPERAND (pfn, 0);
   gcc_assert (TREE_CODE (fn) == FUNCTION_DECL