typeck2.c (build_functional_cast): Add location_t parameter and use it.
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 5 Dec 2019 08:59:24 +0000 (08:59 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 5 Dec 2019 08:59:24 +0000 (08:59 +0000)
commitad774d0d6351789e9e412291cf280c8e3f72bf81
treebd8237a0ca5be9e56071dbd6e347fe6349b1358e
parentad80ec460bf0747541d016e7159d5262560204ab
typeck2.c (build_functional_cast): Add location_t parameter and use it.

/gcc/cp
2019-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

* typeck2.c (build_functional_cast): Add location_t parameter
and use it.
* cp-tree.h: Update declaration.
* parser.c (cp_parser_functional_cast): Adjust call.
* call.c (build_op_delete_call): Likewise.
(build_new_method_call_1): Likewise.
* decl.c (check_initializer): Likewise.
* pt.c (tsubst_copy_and_build): Likewise.
* semantics.c (finish_compound_literal): Likewise.

/libcc1
2019-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

* libcp1plugin.cc (plugin_build_expression_list_expr): Adjust
build_functional_cast call.

/testsuite
2019-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/diagnostic/functional-cast-to-array-type-1.C: New.
* g++.dg/cpp0x/auto25.C: Check location(s) too.
* g++.dg/cpp0x/auto28.C: Likewise.
* g++.dg/init/reference2.C: Likewise.
* g++.dg/parse/template2.C: Likewise.
* g++.dg/template/error8.C: Likewise.
* g++.old-deja/g++.ns/crash3.C: Likewise.
* g++.old-deja/g++.ns/template7.C: Likewise.
* g++.old-deja/g++.pt/crash8.C: Likewise.

From-SVN: r278987
20 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/auto25.C
gcc/testsuite/g++.dg/cpp0x/auto28.C
gcc/testsuite/g++.dg/diagnostic/functional-cast-to-array-type-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/reference2.C
gcc/testsuite/g++.dg/parse/template2.C
gcc/testsuite/g++.dg/template/error8.C
gcc/testsuite/g++.old-deja/g++.ns/crash3.C
gcc/testsuite/g++.old-deja/g++.ns/template7.C
gcc/testsuite/g++.old-deja/g++.pt/crash8.C
libcc1/ChangeLog
libcc1/libcp1plugin.cc