aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2016-05-03 18:03:42 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2016-05-03 18:03:42 +0000
commit79ce98bcefbcd42548dc596316c27b162cabb610 (patch)
tree1356923e14f6cfb6e6e6d80ac03712659ba41aa3 /gcc/cp/call.c
parent402e89f5986220a96898381cc32f7efe76bd092c (diff)
downloadgcc-79ce98bcefbcd42548dc596316c27b162cabb610.zip
gcc-79ce98bcefbcd42548dc596316c27b162cabb610.tar.gz
gcc-79ce98bcefbcd42548dc596316c27b162cabb610.tar.bz2
re PR c/70859 (Bad column number in type-generic function errors)
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. From-SVN: r235832
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 476e806..e9ebdbc 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -7790,7 +7790,8 @@ build_cxx_call (tree fn, int nargs, tree *argarray,
for (i = 0; i < nargs; i++)
argarray[i] = fold_non_dependent_expr (argarray[i]);
- if (!check_builtin_function_arguments (fndecl, nargs, argarray))
+ if (!check_builtin_function_arguments (EXPR_LOCATION (fn), vNULL, fndecl,
+ nargs, argarray))
return error_mark_node;
}