summaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-03 18:03:42 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-03 18:03:42 +0000
commit5d4db8efb03c2ec4fa6ef1a22a657a295fc9f491 (patch)
tree1356923e14f6cfb6e6e6d80ac03712659ba41aa3 /gcc/c
parentca938765fab75f4a2918d2e419bd6cc7247df223 (diff)
downloadgcc-5d4db8efb03c2ec4fa6ef1a22a657a295fc9f491.tar.gz
PR c/70859
* input.c (expansion_point_location): New function. * input.h (expansion_point_location): Declare. * c-common.c (builtin_function_validate_nargs): Add location parameter. Use it. (check_builtin_function_arguments): Add location and arguments parameters. Use them. * c-common.h (check_builtin_function_arguments): Update declaration. * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to check_builtin_function_arguments. * call.c (build_cxx_call): Pass location and vNULL down to check_builtin_function_arguments. * gcc.dg/pr70859.c: New test. * gcc.dg/pr70859-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235832 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-typeck.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index ae6275968c6..8ac13e31f42 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2016-05-03 Marek Polacek <polacek@redhat.com>
+
+ PR c/70859
+ * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
+ check_builtin_function_arguments.
+
2016-05-03 Richard Biener <rguenther@suse.de>
* Make-lang.in (cc1-checksum.c): For stage-final re-use
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 0fa96539b95..204702e505e 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -3046,7 +3046,8 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
if (fundecl
&& DECL_BUILT_IN (fundecl)
&& DECL_BUILT_IN_CLASS (fundecl) == BUILT_IN_NORMAL
- && !check_builtin_function_arguments (fundecl, nargs, argarray))
+ && !check_builtin_function_arguments (loc, arg_loc, fundecl, nargs,
+ argarray))
return error_mark_node;
/* Check that the arguments to the function are valid. */