aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2019-02-06 19:44:52 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2019-02-06 19:44:52 +0000
commitaa9dc19314914cb0a59493fa97d34a5881759d0e (patch)
tree4f2323d48636952633511cb8d2f183e264b6bea9 /gcc/lra-constraints.c
parentd0307ff2cd24861bee4bd5b277c62d50ca0dbe20 (diff)
downloadgcc-aa9dc19314914cb0a59493fa97d34a5881759d0e.zip
gcc-aa9dc19314914cb0a59493fa97d34a5881759d0e.tar.gz
gcc-aa9dc19314914cb0a59493fa97d34a5881759d0e.tar.bz2
Fix locations in conversion_null_warnings (PR c++/71302)
PR c++/71302 reports that g++ shows poor locations for -Wzero-as-null-pointer-constant for pointers in function calls, using the close parenthesis of the call, rather than showing the pertinent argument. This particular case was fixed in GCC 8, but regressed on trunk in r260973. This patch fixes the regression, and adds column numbers to the test cases (where they're correct) to avoid regressing them in the future. There are still various places where the locations aren't correct, but fixing them isn't stage 4 material. gcc/cp/ChangeLog: PR c++/71302 * call.c (get_location_for_expr_unwinding_for_system_header): New function. (conversion_null_warnings): Use it when getting locations for EXPR, effectively adding a call to get_location_for_expr_unwinding_for_system_header for -Wconversion-null and making use of EXPR_LOCATION for -Wzero-as-null-pointer-constant. gcc/testsuite/ChangeLog: PR c++/71302 * g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C: Add expected column numbers to dg-warning directives where they are correct. * g++.dg/warn/Wzero-as-null-pointer-constant-5.C: Likewise. * g++.dg/warn/Wzero-as-null-pointer-constant-7.C: Likewise. * g++.dg/warn/Wzero-as-null-pointer-constant-8.C: New test. From-SVN: r268589
Diffstat (limited to 'gcc/lra-constraints.c')
0 files changed, 0 insertions, 0 deletions