Re: [committed] diagnostics: add line numbers to source (PR other/84889)

2018-08-17 Thread Andreas Schwab
On Aug 17 2018, Manuel López-Ibáñez wrote: > In my Emacs, it jumps to column 8 (where the "a" is). That's because there is no way to place it on column 1. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for so

Re: [committed] diagnostics: add line numbers to source (PR other/84889)

2018-08-17 Thread Manuel López-Ibáñez
On 17/08/18 17:50, Andreas Schwab wrote: On Aug 17 2018, Manuel López-Ibáñez wrote: However, I see that GCC trunk still counts tabs as 1-column, probably because emacs counts tabs as one column when interpreting column numbers in the output of GCC. That is not true. Emacs is using screen co

Re: [committed] diagnostics: add line numbers to source (PR other/84889)

2018-08-17 Thread Andreas Schwab
On Aug 17 2018, Manuel López-Ibáñez wrote: > However, I see that GCC trunk still counts tabs as 1-column, probably > because emacs counts tabs as one column when interpreting column numbers > in the output of GCC. That is not true. Emacs is using screen columns by default for almost 20 years no

Re: [committed] diagnostics: add line numbers to source (PR other/84889)

2018-08-17 Thread Manuel López-Ibáñez
On 09/08/18 21:09, David Malcolm wrote: It turns out that we convert tab characters to *single* space characters when printing source code. This behavior has been present since Manu first implemented -fdiagnostics-show-caret in r186305 (aka 5a9830842f69ebb059061e26f8b0699cbd85121e, PR 24985), w

Re: [committed] diagnostics: add line numbers to source (PR other/84889)

2018-08-09 Thread David Malcolm
On Thu, 2018-08-09 at 11:45 -0400, David Malcolm wrote: > On Thu, 2018-08-09 at 15:40 +, Joseph Myers wrote: > > On Thu, 9 Aug 2018, David Malcolm wrote: > > > > > This patch adds a left margin to the lines of source (and > > > annotations) > > > printed by diagnostic_show_locus, so that e.g.

Re: [committed] diagnostics: add line numbers to source (PR other/84889)

2018-08-09 Thread David Malcolm
On Thu, 2018-08-09 at 15:40 +, Joseph Myers wrote: > On Thu, 9 Aug 2018, David Malcolm wrote: > > > This patch adds a left margin to the lines of source (and > > annotations) > > printed by diagnostic_show_locus, so that e.g. rather than: > > To confirm: if the lines contain tabs anywhere, wi

Re: [committed] diagnostics: add line numbers to source (PR other/84889)

2018-08-09 Thread Joseph Myers
On Thu, 9 Aug 2018, David Malcolm wrote: > This patch adds a left margin to the lines of source (and annotations) > printed by diagnostic_show_locus, so that e.g. rather than: To confirm: if the lines contain tabs anywhere, will the code replace them by spaces when a margin is added to ensure th

[committed] diagnostics: add line numbers to source (PR other/84889)

2018-08-09 Thread David Malcolm
This patch adds a left margin to the lines of source (and annotations) printed by diagnostic_show_locus, so that e.g. rather than: test.c: In function 'test': test.c:12:15: error: 'struct foo' has no member named 'm_bar'; did you mean 'bar'? return ptr->m_bar; ^