public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: gcc-patches@gcc.gnu.org, tom@tromey.com
Subject: Re: [RFC stage 1] Proposed new warning: -Wmisleading-indentation
Date: Fri, 17 Apr 2015 16:12:00 -0000	[thread overview]
Message-ID: <553130E2.8000800@gmail.com> (raw)
In-Reply-To: <877ftahl4u.fsf@tromey.com>

On 17/04/15 16:42, Tom Tromey wrote:
>>>>>> "Dave" == David Malcolm <dmalcolm@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.

This "bug" actually breaks going to an error location in Emacs's compilation 
mode, which is annoying when compiling GCC's code.

> Dave>   (i) a consistent value for tabs in terms of spaces, or
>
> There's already -ftabstop for this, but it isn't per-file.

And it doesn't actually do anything: https://gcc.gnu.org/PR52899

Perhaps it should be fixed to do what was intended and influence how cpp 
transforms tabs as columns?

Also, there is https://gcc.gnu.org/PR49973, which means that non-ascii 
characters may mess up "visual" indentation.

Cheers,

Manuel.

  reply	other threads:[~2015-04-17 16:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 15:08 David Malcolm
2015-04-16 17:27 ` Mike Stump
2015-04-21 16:13   ` David Malcolm
2015-04-21 16:40     ` Trevor Saunders
2015-04-21 16:43     ` Manuel López-Ibáñez
2015-04-21 17:05     ` Mike Stump
2015-04-21 18:14     ` Manuel López-Ibáñez
2015-04-21 23:35       ` David Malcolm
2015-04-28 23:50       ` [PATCH 1/3] Implement -Wmisleading-indentation (v4) David Malcolm
2015-04-28 23:52         ` [PATCH 2/3] Fix spurious semicolons David Malcolm
2015-04-29  0:10           ` Jeff Law
2015-04-28 23:53         ` [PATCH 3/3] Fix indentation issues seen by -Wmisleading-indentation David Malcolm
2015-04-29  0:25           ` Jeff Law
2015-04-29 12:35           ` Mikael Morin
2015-05-05 19:44             ` David Malcolm
2015-05-06 11:38               ` Fix logic error in Fortran OpenACC parsing (was: [PATCH 3/3] Fix indentation issues seen by -Wmisleading-indentation) Thomas Schwinge
2015-05-08 11:24                 ` Fix logic error in Fortran OpenACC parsing Ilmir Usmanov
2015-07-27 14:37                   ` Thomas Schwinge
2015-05-11 21:23         ` [PATCH 1/3] Implement -Wmisleading-indentation (v4) Jeff Law
2015-05-12 21:28           ` David Malcolm
2015-05-12 21:47             ` David Malcolm
2015-08-18 14:13               ` PR67192 (Was: Re: [PATCH 1/3] Implement -Wmisleading-indentation (v4)) Andreas Arnez
2015-04-16 18:29 ` [RFC stage 1] Proposed new warning: -Wmisleading-indentation Manuel López-Ibáñez
2015-04-17 14:42 ` Tom Tromey
2015-04-17 16:12   ` Manuel López-Ibáñez [this message]
2015-04-28 23:13     ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=553130E2.8000800@gmail.com \
    --to=lopezibanez@gmail.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).