On Fri, 17 Apr 2015, Manuel López-Ibáñez wrote:

> On 17/04/15 16:42, Tom Tromey wrote:
> > > > > > > "Dave" == David Malcolm <dmalc...@redhat.com> writes:
> > 
> > Dave> However within libcpp and gcc, in linemap's expanded_location and in
> > Dave> diagnostic messages, the "column" numbers are actually 1-based counts
> > of
> > Dave> *characters*, so the "column" numbers emitted in diagnostics for the
> > Dave> start of the first token in each line are actually:
> > 
> > FWIW this is actually in violation of the GNU coding standards.  There's
> > a bug open for it.  However, I was always afraid to change this in cpp,
> > since presumably it would break existing programs that read gcc's
> > output.  It's a bad situation because the standard can't be changed,
> > either, as other programs (e.g., bison and I think Emacs) do follow it
> > faithfully.
> 
> Which programs rely on precise column numbers given by GCC? They cannot be
> very old neither unused to pain.

I suspect quite a few GCC testcases for column numbers (and hardcoding the 
expected column numbers) will need updating if this bug is fixed, but I 
agree it should be fixed.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to