Improve warning locations (PR66208)
authorBernd Schmidt <bernds@redhat.com>
Wed, 13 Jan 2016 20:03:26 +0000 (20:03 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Wed, 13 Jan 2016 20:03:26 +0000 (20:03 +0000)
commit3342fd71e0465ab4a702480a35043b295fc6fa21
treec35775b90eda0d70234de508315954e7ece5b4b0
parent2ad3adf102641812fe09742f545f8565bebd74ac
Improve warning locations (PR66208)

PR c/66208
* c-common.c (check_function_nonnull): Remove unnecessary declaration.
Add new arg loc and pass it down as context.
(check_nonnull_arg): Don't mark ctx arg as unused. Use it as a pointer
to the location to use for the warning.
(check_function_arguments): New arg loc.  All callers changed.  Pass
it to check_function_nonnull.
* c-common.h (check_function_arguments): Adjust declaration.

testsuite/
PR c/66208
* c-c++-common/pr66208.c: New file.

From-SVN: r232345
gcc/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c/c-typeck.c
gcc/cp/call.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr66208.c [new file with mode: 0644]