diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2019-12-05 08:59:24 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2019-12-05 08:59:24 +0000 |
commit | ad774d0d6351789e9e412291cf280c8e3f72bf81 (patch) | |
tree | bd8237a0ca5be9e56071dbd6e347fe6349b1358e /gcc/cp/semantics.c | |
parent | ad80ec460bf0747541d016e7159d5262560204ab (diff) | |
download | gcc-ad774d0d6351789e9e412291cf280c8e3f72bf81.zip gcc-ad774d0d6351789e9e412291cf280c8e3f72bf81.tar.gz gcc-ad774d0d6351789e9e412291cf280c8e3f72bf81.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 17de39e..83a7891 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2929,7 +2929,8 @@ finish_compound_literal (tree type, tree compound_literal, that it came from T{} rather than T({}). */ CONSTRUCTOR_IS_DIRECT_INIT (compound_literal) = 1; compound_literal = build_tree_list (NULL_TREE, compound_literal); - return build_functional_cast (type, compound_literal, complain); + return build_functional_cast (input_location, type, + compound_literal, complain); } if (TREE_CODE (type) == ARRAY_TYPE |