diff options
author | David Malcolm <dmalcolm@redhat.com> | 2015-12-07 16:07:00 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2015-12-07 16:07:00 +0000 |
commit | f79520bb110d31c9d2e06d463e7d8a3eb437225e (patch) | |
tree | 4276629584cb83bab17864b868f5ecbcc2a63e89 /gcc/c-family | |
parent | 4f6788a1717390202936322b1d2377bab6c45c39 (diff) | |
download | gcc-f79520bb110d31c9d2e06d463e7d8a3eb437225e.zip gcc-f79520bb110d31c9d2e06d463e7d8a3eb437225e.tar.gz gcc-f79520bb110d31c9d2e06d463e7d8a3eb437225e.tar.bz2 |
Fix missing range information for "%q+D" format code
gcc/c-family/ChangeLog:
* c-common.c (c_cpp_error): Update for change to
rich_location::set_range.
gcc/fortran/ChangeLog:
* error.c (gfc_format_decoder): Update for change of
text_info::set_range to text_info::set_location.
gcc/ChangeLog:
* pretty-print.c (text_info::set_range): Rename to...
(text_info::set_location): ...this, converting 2nd param
from source_range to a location_t.
* pretty-print.h (text_info::set_location): Convert
from inline function to external definition.
(text_info::set_range): Delete.
gcc/testsuite/ChangeLog:
* gcc.dg/diagnostic-ranges-1.c: New test file.
* gcc.dg/plugin/diagnostic-test-show-locus-bw.c
(test_percent_q_plus_d): New test function.
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
(test_show_locus): Rewrite test code using
rich_location::set_range. Add code to unit-test the "%q+D"
format code.
libcpp/ChangeLog:
* include/line-map.h (rich_location::set_range): Add line_maps *
param; convert param from source_range to source_location. Drop
"overwrite_loc_p" param.
* line-map.c (rich_location::set_range): Likewise, acting as if
"overwrite_loc_p" were true, and getting range from the location.
From-SVN: r231367
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 4668ce6..03a66eb 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2015-12-07 David Malcolm <dmalcolm@redhat.com> + + * c-common.c (c_cpp_error): Update for change to + rich_location::set_range. + 2015-12-04 Paolo Bonzini <bonzini@gnu.org> * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index f89deb3..9bc02fc 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -10161,9 +10161,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level, int reason, gcc_unreachable (); } if (done_lexing) - richloc->set_range (0, - source_range::from_location (input_location), - true, true); + richloc->set_range (line_table, 0, input_location, true); diagnostic_set_info_translated (&diagnostic, msg, ap, richloc, dlevel); diagnostic_override_option_index (&diagnostic, |