This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC stage 1] Proposed new warning: -Wmisleading-indentation
- From: Tom Tromey <tom at tromey dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 17 Apr 2015 08:42:09 -0600
- Subject: Re: [RFC stage 1] Proposed new warning: -Wmisleading-indentation
- Authentication-results: sourceware.org; auth=none
- References: <1429196485 dot 32584 dot 46 dot camel at surprise>
>>>>> "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.
Dave> (i) a consistent value for tabs in terms of spaces, or
There's already -ftabstop for this, but it isn't per-file.
Tom