From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id E842D385700C for ; Tue, 6 Oct 2020 15:09:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E842D385700C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-441-UKd_YqbAMgKMDxZZFuSjPQ-1; Tue, 06 Oct 2020 11:09:00 -0400 X-MC-Unique: UKd_YqbAMgKMDxZZFuSjPQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 46EF387950D; Tue, 6 Oct 2020 15:08:59 +0000 (UTC) Received: from t470.redhat.com (ovpn-112-135.phx2.redhat.com [10.3.112.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD82A1A800; Tue, 6 Oct 2020 15:08:58 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Subject: [committed, wwwdocs] gcc-11/changes: Add notes about column number changes Date: Tue, 6 Oct 2020 11:08:46 -0400 Message-Id: <20201006150846.204664-1-dmalcolm@redhat.com> In-Reply-To: <20200713210755.GA5861@ldh-macbook.lan> References: <20200713210755.GA5861@ldh-macbook.lan> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 15:09:05 -0000 I've taken the liberty of pushing this website patch, having checked that it validates. It covers the changes by Lewis in 004bb936d6d5f177af26ad4905595e843d5665a5 (PR 49973 and PR 86904). --- htdocs/gcc-11/changes.html | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) 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). +

    +
  • -- 2.26.2