This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/86904] Column numbers ignore tab characters
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 10 Nov 2018 03:58:22 +0000
- Subject: [Bug other/86904] Column numbers ignore tab characters
- Auto-submitted: auto-generated
- References: <bug-86904-4@http.gcc.gnu.org/bugzilla/>
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