typeck.c (cp_build_indirect_ref_1): Add location_t parameter and use it in error...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 25 Nov 2019 13:49:50 +0000 (13:49 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 25 Nov 2019 13:49:50 +0000 (13:49 +0000)
commit3554d8ffc5a55f4173feb30619fab4131ba46032
tree79354a0db21e81c61cc65750b8bcd25d5a9cc10b
parent5b8d9367684f266c30c280b4d3c98830a88c70ab
typeck.c (cp_build_indirect_ref_1): Add location_t parameter and use it in error messages.

/gcc
2019-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

* typeck.c (cp_build_indirect_ref_1): Add location_t parameter
and use it in error messages.
(build_x_indirect_ref): Adjust call.
(build_indirect_ref): Likewise.
(cp_build_fold_indirect_ref): Likewise.
(cp_build_array_ref): Likewise.
* call.c (build_new_op_1): Likewise.
* semantics.c (finish_omp_clauses): Likewise.
(finish_omp_depobj): Likewise.
* typeck2.c (build_x_arrow): Likewise.
* cp-tree.h (cp_build_indirect_ref): Update declaration.

* call.c (build_new_op_1): Use location argument in warning_at.

* typeck.c (cp_build_modify_expr): Consistently use the
location_t argument.

/libcc1
2019-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

* libcp1plugin.cc (plugin_pragma_push_user_expression): Update
cp_build_indirect_ref call.

/gcc/testsuite
2019-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/diagnostic/base-operand-non-pointer-1.C: New.
* g++.dg/pr53055.C: Check location too.
* g++.old-deja/g++.bugs/900213_02.C: Likewise.
* g++.old-deja/g++.bugs/900215_02.C: Likewise.
* g++.old-deja/g++.other/badarrow.C: Likewise.
* g++.old-deja/g++.other/deref1.C: Likewise.

* g++.dg/warn/Wenum-compare.C: Check location too.

* g++.dg/cpp0x/initlist26.C: Check location too.
* g++.dg/cpp0x/initlist28.C: Likewise.
* g++.dg/cpp0x/initlist29.C: Likewise.
* g++.dg/cpp0x/initlist33.C: Likewise.
* g++.dg/expr/string-2.C: Likewise.
* g++.dg/other/ptrmem5.C: Likewise.
* g++.old-deja/g++.benjamin/14664-1.C: Likewise.
* g++.old-deja/g++.benjamin/14664-2.C: Likewise.
* g++.old-deja/g++.brendan/init12.C: Likewise.
* g++.old-deja/g++.bugs/900324_04.C: Likewise.
* g++.old-deja/g++.ext/array1.C: Likewise.
* g++.old-deja/g++.jason/rfg17.C: Likewise.

From-SVN: r278685
28 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/initlist26.C
gcc/testsuite/g++.dg/cpp0x/initlist28.C
gcc/testsuite/g++.dg/cpp0x/initlist29.C
gcc/testsuite/g++.dg/cpp0x/initlist33.C
gcc/testsuite/g++.dg/diagnostic/base-operand-non-pointer-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/expr/string-2.C
gcc/testsuite/g++.dg/other/ptrmem5.C
gcc/testsuite/g++.dg/pr53055.C
gcc/testsuite/g++.dg/warn/Wenum-compare.C
gcc/testsuite/g++.old-deja/g++.benjamin/14664-1.C
gcc/testsuite/g++.old-deja/g++.benjamin/14664-2.C
gcc/testsuite/g++.old-deja/g++.brendan/init12.C
gcc/testsuite/g++.old-deja/g++.bugs/900213_02.C
gcc/testsuite/g++.old-deja/g++.bugs/900215_02.C
gcc/testsuite/g++.old-deja/g++.bugs/900324_04.C
gcc/testsuite/g++.old-deja/g++.ext/array1.C
gcc/testsuite/g++.old-deja/g++.jason/rfg17.C
gcc/testsuite/g++.old-deja/g++.other/badarrow.C
gcc/testsuite/g++.old-deja/g++.other/deref1.C
libcc1/ChangeLog
libcc1/libcp1plugin.cc