re PR c/59940 (Imprecise column number for -Wconversion)
authorMarek Polacek <polacek@redhat.com>
Thu, 30 Jan 2014 16:15:36 +0000 (16:15 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 30 Jan 2014 16:15:36 +0000 (16:15 +0000)
commit68fca5952947613ca6239242cbd498ac7ce12b7e
tree1864e86fe52740bb3329849e59bfb3edd8b05587
parent2d70f6d43551f5e6344909b8f2020a92ae7e4839
re PR c/59940 (Imprecise column number for -Wconversion)

PR c/59940
c-family/
* c-common.h (unsafe_conversion_p): Adjust declaration.
(warnings_for_convert_and_check): Likewise.
(convert_and_check): Likewise.
* c-common.c (unsafe_conversion_p): Add location parameter.  Call
expansion_point_location_if_in_system_header on it.
(warnings_for_convert_and_check): Add location parameter.  Call
expansion_point_location_if_in_system_header on it.  Use it.
(convert_and_check): Add location parameter.  Use it.
(conversion_warning): Likewise.
(c_add_case_label): Adjust convert_and_check calls.
(scalar_to_vector): Adjust unsafe_conversion_p calls.
cp/
* typeck.c (build_ptrmemfunc1): Call convert_and_check with
input_location.
* cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
with input_location.
* call.c (build_conditional_expr_1): Call unsafe_conversion_p with
loc parameter.
c/
* c-typeck.c (build_function_call_vec): Use loc parameter.
(convert_arguments): Add location parameter.  Use it.
(ep_convert_and_check): Likewise.
(build_atomic_assign): Adjust convert_for_assignment call.
(build_modify_expr): Likewise.
(digest_init): Likewise.
(c_finish_return): Likewise.
(build_conditional_expr): Adjust ep_convert_and_check calls.
(convert_for_assignment): Add rhs_loc parameter.  Use it.
(build_binary_op): Adjust convert_and_check and ep_convert_and_check
calls.
testsuite/
* gcc.dg/pr59940.c: New test.
* gcc.dg/pr35635.c (func3): Move dg-warning.

From-SVN: r207309
12 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cvt.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr35635.c
gcc/testsuite/gcc.dg/pr59940.c [new file with mode: 0644]