typeck.c (composite_pointer_type): Add a const op_location_t& parameter and use it...
authorPaolo Carlini <paolo.carlini@oracle.com>
Sat, 2 Nov 2019 09:13:37 +0000 (09:13 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 2 Nov 2019 09:13:37 +0000 (09:13 +0000)
commitb77c16f9dd7875cf0927365ac386ac9d80967328
treee174045073f34a49420e5c5da1aa175890b951ac
parentd0c464d27244ba47e66f3e1444354e423304bd12
typeck.c (composite_pointer_type): Add a const op_location_t& parameter and use it in diagnostics.

/cp
2019-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

* typeck.c (composite_pointer_type): Add a const op_location_t&
parameter and use it in diagnostics.
(composite_pointer_error): Likewise.
(composite_pointer_type_r): Add a const op_location_t&
parameter and forward it.
(cp_build_binary_op): Adjust calls.
(common_pointer_type): Likewise.
* call.c (add_builtin_candidate): Likewise.
(build_conditional_expr_1): Likewise.
* cp-tree.h (composite_pointer_type): Update declaration.

* typeck.c (cxx_sizeof_expr): Use cp_expr_loc_or_input_loc
in permerror.
(cxx_alignof_expr): Likewise.
(lvalue_or_else): Likewise.

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

* g++.dg/conversion/ptrmem9.C: Check location.
* g++.dg/expr/cond2.C: Likewise.
* g++.dg/warn/Waddress-1.C: Check locations.
* g++.old-deja/g++.bugs/900324_02.C: Check location.
* g++.old-deja/g++.jason/rfg20.C: Likewise.
* g++.old-deja/g++.law/typeck1.C: Likewise.
* g++.old-deja/g++.rfg/00321_01-.C: Likewise.
* g++.old-deja/g++.rfg/00324_02-.C: Likewise.

* g++.dg/diagnostic/alignof1.C: New.
* g++.dg/expr/sizeof1.C: Check location.
* g++.dg/cpp0x/rv-lvalue-req.C: Check locations.

From-SVN: r277743
16 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/conversion/ptrmem9.C
gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C
gcc/testsuite/g++.dg/diagnostic/alignof1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/expr/cond2.C
gcc/testsuite/g++.dg/expr/sizeof1.C
gcc/testsuite/g++.dg/warn/Waddress-1.C
gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C
gcc/testsuite/g++.old-deja/g++.jason/rfg20.C
gcc/testsuite/g++.old-deja/g++.law/typeck1.C
gcc/testsuite/g++.old-deja/g++.rfg/00321_01-.C
gcc/testsuite/g++.old-deja/g++.rfg/00324_02-.C