diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-02 23:16:21 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-02 23:16:21 +0000 |
commit | 9ce648e26846583b5b4057e3ea00a53dcda10903 (patch) | |
tree | d2feb1247880ddba0b22453e08c0e9d0acd9ba51 | |
parent | 39876acc2fe01b4a3cd2d1988245d845315aff35 (diff) | |
download | gcc-9ce648e26846583b5b4057e3ea00a53dcda10903.tar.gz |
libcpp uses diagnostic->override_column to give a custom column number to
diagnostics. This is taken into account when building the prefix, but it was
missing when placing the caret.
2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
* diagnostic.c (diagnostic_show_locus): Honor override_column when
placing the caret.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218295 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/diagnostic.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2eb9506485..ceb9e108a9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org> + + * diagnostic.c (diagnostic_show_locus): Honor override_column when + placing the caret. + 2014-12-02 Dmitry Vyukov <dvyukov@google.com> * asan.c: (asan_finish_file): Use default priority for constructors diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index f7f8aaa23c0..0c8fbe5f766 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -310,6 +310,8 @@ diagnostic_show_locus (diagnostic_context * context, context->last_location = diagnostic->location; s = expand_location_to_spelling_point (diagnostic->location); + if (diagnostic->override_column) + s.column = diagnostic->override_column; line = location_get_source_line (s, &line_width); if (line == NULL || s.column > line_width) return; |