diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-12-02 23:16:21 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-12-02 23:16:21 +0000 |
commit | 7f9283bf66259579b2da5fd407b078147e9ed798 (patch) | |
tree | d2feb1247880ddba0b22453e08c0e9d0acd9ba51 /gcc | |
parent | f5d5b88fe59d8689344cc64b33e7e7c2b7a7ba70 (diff) | |
download | gcc-7f9283bf66259579b2da5fd407b078147e9ed798.zip gcc-7f9283bf66259579b2da5fd407b078147e9ed798.tar.gz gcc-7f9283bf66259579b2da5fd407b078147e9ed798.tar.bz2 |
libcpp uses diagnostic->override_column to give a custom column number to diagnostics.
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.
From-SVN: r218295
Diffstat (limited to 'gcc')
-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 b2eb950..ceb9e10 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 f7f8aaa..0c8fbe5 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; |