This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/86904] Column numbers ignore tab characters


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86904

--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #2)
> (In reply to richard.earnshaw from comment #1)
> > On 09/08/18 21:08, dmalcolm at gcc dot gnu.org wrote:
> [...snip...]
> > > Maybe:
> > >   -fdiagnostics-x-coord=bytes : count of bytes
> > >   -fdiagnostics-x-coord=characters : count of characters (not special-casing
> > > tab)
> > >   -fdiagnostics-x-coord=columns : count of columns: as per characters, but with
> > > tabs doing tabstops
> > 
> > how about -fdiagnostics-x-coord=visual-[n]
> > 
> > Where n is the size of a hard tab?  Some folks change the tab stop to 4,
> > for example.  Or maybe ...coord=tab[-n], where -n defaults to "-8".
> 
> The C family of frontends already has:
>   -ftabstop=<number>	Distance between tab stops for column reporting.
> which IIRC is currently only used by -Wmisleading-indentation.  I guess it
> could be moved to common.opt.

Yeah, using -ftabstop makes sense

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]