diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2012-05-06 15:06:31 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2012-05-06 15:06:31 +0000 |
commit | 4fe977f2d691e6c3b03056a5d9eae223d67ac526 (patch) | |
tree | 091bdd2e12e8553129d9574e18d678519a3acedf /gcc/cp/decl2.c | |
parent | 630dfc9c518aadc930be98f64a4cdc9a10bd45ca (diff) | |
download | gcc-4fe977f2d691e6c3b03056a5d9eae223d67ac526.zip gcc-4fe977f2d691e6c3b03056a5d9eae223d67ac526.tar.gz gcc-4fe977f2d691e6c3b03056a5d9eae223d67ac526.tar.bz2 |
re PR c++/53152 (In "no match for operatorXX" error message gives the wrong column info)
2012-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53152
* call.c (op_error, build_new_op_1, build_new_op): Add location_t
parameter.
(build_conditional_expr_1): Adjust.
* typeck.c (build_x_indirect_ref, build_x_binary_op,
build_x_unary_op): Add location_t parameter.
(rationalize_conditional_expr, build_x_array_ref,
build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
Adjust.
* typeck2.c (build_x_arrow): Add location_t parameter.
* semantics.c (finish_unary_op_expr): Likewise.
(finish_increment_expr, handle_omp_for_class_iterator): Adjust.
* decl2.c (grok_array_decl): Add location_t parameter.
* parser.c (cp_parser_postfix_open_square_expression,
cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
cp_parser_binary_expression, cp_parser_builtin_offsetof,
do_range_for_auto_deduction, cp_convert_range_for,
cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
location, adjust.
* pt.c (tsubst_copy_and_build): Adjust.
* tree.c (maybe_dummy_object): Likewise.
* cp-tree.h: Update declarations.
From-SVN: r187211
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 5d1f8de..b0544bb 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -336,7 +336,7 @@ grokclassfn (tree ctype, tree function, enum overload_flags flags) along the way. */ tree -grok_array_decl (tree array_expr, tree index_exp) +grok_array_decl (location_t loc, tree array_expr, tree index_exp) { tree type; tree expr; @@ -362,7 +362,7 @@ grok_array_decl (tree array_expr, tree index_exp) /* If they have an `operator[]', use that. */ if (MAYBE_CLASS_TYPE_P (type) || MAYBE_CLASS_TYPE_P (TREE_TYPE (index_exp))) - expr = build_new_op (ARRAY_REF, LOOKUP_NORMAL, + expr = build_new_op (loc, ARRAY_REF, LOOKUP_NORMAL, array_expr, index_exp, NULL_TREE, /*overload=*/NULL, tf_warning_or_error); else |