public inbox for gcc-cvs-wwwdocs@sourceware.org
help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@sourceware.org>
To: gcc-cvs-wwwdocs@gcc.gnu.org
Subject: gcc-wwwdocs branch master updated. df48cfe754f3ec94c83955c29133baa9580bc1df
Date: Tue,  6 Oct 2020 15:04:07 +0000 (GMT)	[thread overview]
Message-ID: <20201006150407.D2FFB3952C3A@sourceware.org> (raw)

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 <dmalcolm@redhat.com>
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.</p>
           control if function entries and exits should be instrumented.</li>
     </ul>
   </li>
+  <li>
+    <p>
+      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:
+    </p>
+    <ul>
+      <li>multibyte characters (requiring more than one byte to encode), and</li>
+      <li>multicolumn characters (requiring more than one column to display in a monospace font)</li>
+    </ul>
+    <p>
+      For example, the character &#x3c0; ("GREEK SMALL LETTER PI (U+03C0)")
+      occupies one column, and its UTF-8 encoding requires two bytes; the
+      character &#x1F642; ("SLIGHTLY SMILING FACE (U+1F642)") occupies two
+      columns, and its UTF-8 encoding requires four bytes.
+    </p>
+    <p>
+      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
+      <a href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-column-unit">-fdiagnostics-column-unit=byte</a>.
+      There is also a new option
+      <a href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-column-origin">-fdiagnostics-column-origin=</a>,
+      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
+      <a href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format">-fdiagnostics-format=json</a>
+      has been extended to supply both byte counts and column numbers for all source locations.
+    </p>
+    <p>
+      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
+      <a href="https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-ftabstop">-ftabstop</a>
+      option (which defaults to 8 spaces per tab stop).
+    </p>
+  </li>
 </ul>
 
 <!-- .................................................................. -->

-----------------------------------------------------------------------

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


hooks/post-receive
-- 
gcc-wwwdocs


                 reply	other threads:[~2020-10-06 15:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20201006150407.D2FFB3952C3A@sourceware.org \
    --to=dmalcolm@sourceware.org \
    --cc=gcc-cvs-wwwdocs@gcc.gnu.org \
    /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).