From 8edbfaa667837b66a65cce37f46c54341351a35c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 28 Mar 2014 19:16:32 +0100 Subject: re PR c++/60689 (Bogus error with atomic::exchange) PR c++/60689 * c-tree.h (c_build_function_call_vec): New prototype. * c-typeck.c (build_function_call_vec): Don't call resolve_overloaded_builtin here. (c_build_function_call_vec): New wrapper function around build_function_call_vec. Call resolve_overloaded_builtin here. (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign): Call c_build_function_call_vec instead of build_function_call_vec. * c-parser.c (c_parser_postfix_expression_after_primary): Likewise. * c-decl.c (finish_decl): Likewise. * c-common.c (add_atomic_size_parameter): When creating new params vector, push the size argument first. * c-c++-common/pr60689.c: New test. From-SVN: r208912 --- gcc/c/c-decl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/c/c-decl.c') diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 2c41bf2..df84980 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -4568,8 +4568,8 @@ finish_decl (tree decl, location_t init_loc, tree init, cleanup = build_unary_op (input_location, ADDR_EXPR, decl, 0); vec_alloc (v, 1); v->quick_push (cleanup); - cleanup = build_function_call_vec (DECL_SOURCE_LOCATION (decl), - vNULL, cleanup_decl, v, NULL); + cleanup = c_build_function_call_vec (DECL_SOURCE_LOCATION (decl), + vNULL, cleanup_decl, v, NULL); vec_free (v); /* Don't warn about decl unused; the cleanup uses it. */ -- cgit v1.1