From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2209) id D2FFB3952C3A; Tue, 6 Oct 2020 15:04:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2FFB3952C3A To: gcc-cvs-wwwdocs@gcc.gnu.org Subject: gcc-wwwdocs branch master updated. df48cfe754f3ec94c83955c29133baa9580bc1df X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 693cc9122512b580926acacf2b7516b0a23b770a X-Git-Newrev: df48cfe754f3ec94c83955c29133baa9580bc1df Message-Id: <20201006150407.D2FFB3952C3A@sourceware.org> Date: Tue, 6 Oct 2020 15:04:07 +0000 (GMT) From: David Malcolm X-BeenThere: gcc-cvs-wwwdocs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs-wwwdocs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 15:04:07 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gcc-wwwdocs". The branch, master has been updated via df48cfe754f3ec94c83955c29133baa9580bc1df (commit) from 693cc9122512b580926acacf2b7516b0a23b770a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit df48cfe754f3ec94c83955c29133baa9580bc1df Author: David Malcolm Date: Tue Oct 6 11:02:22 2020 -0400 gcc-11/changes: Add notes about column number changes diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index 64655120..e2a32e51 100644 --- a/htdocs/gcc-11/changes.html +++ b/htdocs/gcc-11/changes.html @@ -72,6 +72,45 @@ a work-in-progress.

control if function entries and exits should be instrumented. +
  • +

    + In previous releases of GCC, the "column numbers" emitted in diagnostics + were actually a count of bytes from the start of the source line. This + could be problematic, both because of: +

    +
      +
    • multibyte characters (requiring more than one byte to encode), and
    • +
    • multicolumn characters (requiring more than one column to display in a monospace font)
    • +
    +

    + For example, the character π ("GREEK SMALL LETTER PI (U+03C0)") + occupies one column, and its UTF-8 encoding requires two bytes; the + character 🙂 ("SLIGHTLY SMILING FACE (U+1F642)") occupies two + columns, and its UTF-8 encoding requires four bytes. +

    +

    + In GCC 11 the column numbers default to being column numbers, respecting + multi-column characters. The old behavior can be restored using a new + option + -fdiagnostics-column-unit=byte. + There is also a new option + -fdiagnostics-column-origin=, + allowing the pre-existing default of the left-hand column being column + 1 to be overridden if desired (e.g. for 0-based columns). The output + of + -fdiagnostics-format=json + has been extended to supply both byte counts and column numbers for all source locations. +

    +

    + Additionally, in previous releases of GCC, tab characters in the source + would be emitted verbatim when quoting source code, but be prefixed + with whitespace or line number information, leading to misalignments + in the resulting output when compared with the actual source. Tab + characters are now printed as an appropriate number of spaces, using the + -ftabstop + option (which defaults to 8 spaces per tab stop). +

    +
  • ----------------------------------------------------------------------- Summary of changes: htdocs/gcc-11/changes.html | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) hooks/post-receive -- gcc-wwwdocs