aboutsummaryrefslogtreecommitdiff
path: root/libcpp/ChangeLog
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2017-11-28 19:24:35 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2017-11-28 19:24:35 +0000
commit6df8934f6ad73b97181fc0a997b3eb8cd799b6a0 (patch)
tree573d13446d8c970c3e108f5272ecd2119546e821 /libcpp/ChangeLog
parente5cf5e116da6f5c018ecc8f714935877c4636780 (diff)
downloadgcc-6df8934f6ad73b97181fc0a997b3eb8cd799b6a0.zip
gcc-6df8934f6ad73b97181fc0a997b3eb8cd799b6a0.tar.gz
gcc-6df8934f6ad73b97181fc0a997b3eb8cd799b6a0.tar.bz2
Reject fix-it hints for various awkward boundary cases (PR c/82050)
PR c/82050 reports a failed assertion deep within diagnostic_show_locus's code for printing fix-it hints. The root cause is a fix-it hint suggesting a textual replacement, where the affected column numbers straddle the LINE_MAP_MAX_COLUMN_NUMBER boundary, so that the start of the range has a column number, but the end of the range doesn't. The fix is to verify that the column numbers are sane when adding fix-it hints to a rich_location, rejecting fix-it hints where they are not. libcpp/ChangeLog: PR c/82050 * include/line-map.h (LINE_MAP_MAX_COLUMN_NUMBER): Move here. * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): ...from here. (rich_location::maybe_add_fixit): Reject fix-it hints in which the start column exceeds the next column. From-SVN: r255214
Diffstat (limited to 'libcpp/ChangeLog')
-rw-r--r--libcpp/ChangeLog8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 556373e..2250b77 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,11 @@
+2017-11-28 David Malcolm <dmalcolm@redhat.com>
+
+ PR c/82050
+ * include/line-map.h (LINE_MAP_MAX_COLUMN_NUMBER): Move here.
+ * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): ...from here.
+ (rich_location::maybe_add_fixit): Reject fix-it hints in which
+ the start column exceeds the next column.
+
2017-11-20 Eric Gallager <egall@gwmail.gwu.edu>
PR preprocessor/81794