From patchwork Tue Oct 6 15:08:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 1377503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=S6d2iPsH; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C5LTg10b4z9sS8 for ; Wed, 7 Oct 2020 02:09:09 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 947AE39540CC; Tue, 6 Oct 2020 15:09:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 947AE39540CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1601996946; bh=srrXZJHCPfjJcMIPs87dR4G2wBwretm8ViD1J9lCWbE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=S6d2iPsH0eRho9FFaOAWwEnvBRphpKz81NnAC/dCUgRwqI1GOyT8sgo0FhdQBu0YZ Ko2tqUEP6DzUE0ZeXBmXsO/2xeos7gwYP0wQEeSfQczbsxZMKqZ7y89dxgNLrK3MaF E6yqHnTGL8/5wIscVDR8yVpTD0fmli05goD67uXA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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) 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 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-Patchwork-Original-From: David Malcolm via Gcc-patches From: David Malcolm Reply-To: David Malcolm Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" 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). +

    +