aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-12-21 17:45:34 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-12-21 17:45:34 +0000
commit745e411d4fd4739118356662329a509a8b7d4ae8 (patch)
tree646f3ed78c4f1afbdbb1c0deb9b8436571b732c3 /gcc/fold-const.c
parent7c154ecc12c064ba3b154d1d27be6f19dbd0c294 (diff)
downloadgcc-745e411d4fd4739118356662329a509a8b7d4ae8.zip
gcc-745e411d4fd4739118356662329a509a8b7d4ae8.tar.gz
gcc-745e411d4fd4739118356662329a509a8b7d4ae8.tar.bz2
C and C++ FE: fix source ranges for binary ops
gcc/c-family/ChangeLog: * c-common.c (binary_op_error): Convert first param from location_t to rich_location * and use it when emitting an error. * c-common.h (binary_op_error): Convert first param from location_t to rich_location *. gcc/c/ChangeLog: * c-typeck.c: Include "gcc-rich-location.h". (build_binary_op): In the two places that call binary_op_error, create a gcc_rich_location and populate it with the location of the binary op and its two operands. gcc/cp/ChangeLog: * typeck.c (cp_build_binary_op): Update for change in signature of build_binary_op. Use error_at to replace an implicit use of input_location with param "location" in "invalid operands" error. (cp_build_binary_op): Replace an error with an error_at, using "location", rather than implicitly using input_location. gcc/testsuite/ChangeLog: * g++.dg/diagnostic/bad-binary-ops.C: New test case. * gcc.dg/bad-binary-ops.c: New test case. gcc.dg/plugin/diagnostic_plugin_show_trees.c (get_range_for_expr): Remove material copied from gcc-rich-location.c (gcc_rich_location::add_expr): Likewise. From-SVN: r231884
Diffstat (limited to 'gcc/fold-const.c')
0 files changed, 0 insertions, 0 deletions