aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2014-01-31 08:13:50 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2014-01-31 08:13:50 +0000
commit81e5eca87345f0eba9c9ba4a5c9afb508e701444 (patch)
treed72ad2d85070a83e828f16474ea193868efb9831 /gcc/objc
parent4f50b9ff5690abc3508483ac1df2a6346fc10fe4 (diff)
downloadgcc-81e5eca87345f0eba9c9ba4a5c9afb508e701444.zip
gcc-81e5eca87345f0eba9c9ba4a5c9afb508e701444.tar.gz
gcc-81e5eca87345f0eba9c9ba4a5c9afb508e701444.tar.bz2
re PR c/59963 (Wrong column number for warning -Woverflow)
PR c/59963 c-family/ * c-common.c (add_atomic_size_parameter): Pass vNULL to build_function_call_vec. (resolve_overloaded_builtin): Likewise. * c-common.h (build_function_call_vec): Adjust declaration. cp/ * typeck.c (build_function_call_vec): Add dummy arg_loc parameter. c/ * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to build_function_call_vec. (build_function_call): Likewise. (build_atomic_assign): Likewise. (build_function_call_vec): Add arg_loc parameter. Use it. (convert_arguments): Likewise. (convert_for_assignment): Rename rhs_loc to expr_loc. * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list. (c_parser_objc_keywordexpr): Likewise. (c_parser_postfix_expression_after_primary): Call build_function_call_vec with expr_loc rather than op_loc. Call c_parser_expr_list to fill arg_loc. Pass arg_loc to build_function_call_vec. (c_parser_expr_list): Add locations parameter. Fill it with locations of function arguments. * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec. objc/ * objc-next-runtime-abi-02.c (build_throw_stmt): Pass vNULL to build_function_call_vec. (finish_catch): Likewise. (next_runtime_abi_02_get_class_reference): Likewise. * objc-next-runtime-abi-01.c (build_objc_method_call): Pass vNULL to build_function_call_vec. (build_throw_stmt): Likewise. * objc-gnu-runtime-abi-01.c: (build_objc_method_call): Pass vNULL to build_function_call_vec. (build_throw_stmt): Likewise. testsuite/ * gcc.dg/pr59940.c (g): Adjust dg-warning. (y): Adjust dg-error. * gcc.dg/cast-function-1.c (bar): Adjust dg-warnings. * gcc.dg/pr59963-1.c: New test. * gcc.dg/pr59963-2.c: New test. * gcc.dg/pr59963-3.c: New test. From-SVN: r207335
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog14
-rw-r--r--gcc/objc/objc-gnu-runtime-abi-01.c7
-rw-r--r--gcc/objc/objc-next-runtime-abi-01.c5
-rw-r--r--gcc/objc/objc-next-runtime-abi-02.c12
4 files changed, 29 insertions, 9 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 3840377..ca9841e 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,17 @@
+2014-01-31 Marek Polacek <polacek@redhat.com>
+
+ PR c/59963
+ * objc-next-runtime-abi-02.c (build_throw_stmt): Pass vNULL to
+ build_function_call_vec.
+ (finish_catch): Likewise.
+ (next_runtime_abi_02_get_class_reference): Likewise.
+ * objc-next-runtime-abi-01.c (build_objc_method_call): Pass vNULL to
+ build_function_call_vec.
+ (build_throw_stmt): Likewise.
+ * objc-gnu-runtime-abi-01.c: (build_objc_method_call): Pass vNULL to
+ build_function_call_vec.
+ (build_throw_stmt): Likewise.
+
2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
Update copyright years
diff --git a/gcc/objc/objc-gnu-runtime-abi-01.c b/gcc/objc/objc-gnu-runtime-abi-01.c
index 570dc93..8cfa1f8 100644
--- a/gcc/objc/objc-gnu-runtime-abi-01.c
+++ b/gcc/objc/objc-gnu-runtime-abi-01.c
@@ -700,7 +700,7 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype,
then cast the pointer, then call it with the method arguments. */
tv->quick_push (lookup_object);
tv->quick_push (selector);
- method = build_function_call_vec (loc, sender, tv, NULL);
+ method = build_function_call_vec (loc, vNULL, sender, tv, NULL);
vec_free (tv);
/* Pass the appropriate object to the method. */
@@ -715,7 +715,7 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype,
/* Build an obj_type_ref, with the correct cast for the method call. */
t = build3 (OBJ_TYPE_REF, sender_cast, method, lookup_object, size_zero_node);
- t = build_function_call_vec (loc, t, parms, NULL);
+ t = build_function_call_vec (loc, vNULL, t, parms, NULL);
vec_free (parms);
return t;
}
@@ -2213,7 +2213,8 @@ build_throw_stmt (location_t loc, tree throw_expr, bool rethrown ATTRIBUTE_UNUSE
/* A throw is just a call to the runtime throw function with the
object as a parameter. */
parms->quick_push (throw_expr);
- t = build_function_call_vec (loc, objc_exception_throw_decl, parms, NULL);
+ t = build_function_call_vec (loc, vNULL, objc_exception_throw_decl, parms,
+ NULL);
vec_free (parms);
return add_stmt (t);
}
diff --git a/gcc/objc/objc-next-runtime-abi-01.c b/gcc/objc/objc-next-runtime-abi-01.c
index bf8f463..1879d10 100644
--- a/gcc/objc/objc-next-runtime-abi-01.c
+++ b/gcc/objc/objc-next-runtime-abi-01.c
@@ -882,7 +882,7 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype,
/* Build an obj_type_ref, with the correct cast for the method call. */
t = build3 (OBJ_TYPE_REF, sender_cast, method,
lookup_object, size_zero_node);
- t = build_function_call_vec (loc, t, parms, NULL);
+ t = build_function_call_vec (loc, vNULL, t, parms, NULL);
vec_free (parms);
return t;
}
@@ -2866,7 +2866,8 @@ build_throw_stmt (location_t loc, tree throw_expr, bool rethrown ATTRIBUTE_UNUSE
/* A throw is just a call to the runtime throw function with the
object as a parameter. */
parms->quick_push (throw_expr);
- t = build_function_call_vec (loc, objc_exception_throw_decl, parms, NULL);
+ t = build_function_call_vec (loc, vNULL, objc_exception_throw_decl, parms,
+ NULL);
vec_free (parms);
return add_stmt (t);
}
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index 6ba5e68..ee43d2d 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -1088,7 +1088,8 @@ next_runtime_abi_02_get_class_reference (tree ident)
t = my_build_string_pointer (IDENTIFIER_LENGTH (ident) + 1,
IDENTIFIER_POINTER (ident));
v->quick_push (t);
- t = build_function_call_vec (input_location, objc_get_class_decl, v, 0);
+ t = build_function_call_vec (input_location, vNULL, objc_get_class_decl,
+ v, 0);
vec_free (v);
return t;
}
@@ -3622,14 +3623,16 @@ build_throw_stmt (location_t loc, tree throw_expr, bool rethrown)
tree t;
if (rethrown)
/* We have a separate re-throw entry. */
- t = build_function_call_vec (loc, objc_rethrow_exception_decl, NULL, NULL);
+ t = build_function_call_vec (loc, vNULL, objc_rethrow_exception_decl,
+ NULL, NULL);
else
{
/* Throw like the others... */
vec<tree, va_gc> *parms;
vec_alloc (parms, 1);
parms->quick_push (throw_expr);
- t = build_function_call_vec (loc, objc_exception_throw_decl, parms, 0);
+ t = build_function_call_vec (loc, vNULL, objc_exception_throw_decl,
+ parms, 0);
vec_free (parms);
}
return add_stmt (t);
@@ -3708,7 +3711,8 @@ finish_catch (struct objc_try_context **cur_try_context, tree curr_catch)
/* Pick up the new context we made in begin_try above... */
ct = *cur_try_context;
- func = build_function_call_vec (loc, objc2_end_catch_decl, NULL, NULL);
+ func = build_function_call_vec (loc, vNULL, objc2_end_catch_decl, NULL,
+ NULL);
append_to_statement_list (func, &ct->finally_body);
try_exp = build_stmt (loc, TRY_FINALLY_EXPR, ct->try_body, ct->finally_body);
*cur_try_context = ct->outer;