public inbox for gcc-cvs-wwwdocs@sourceware.org
help / color / mirror / Atom feed
* gcc-wwwdocs branch master updated. df48cfe754f3ec94c83955c29133baa9580bc1df
@ 2020-10-06 15:04 David Malcolm
  0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2020-10-06 15:04 UTC (permalink / raw)
  To: gcc-cvs-wwwdocs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-06 15:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 15:04 gcc-wwwdocs branch master updated. df48cfe754f3ec94c83955c29133baa9580bc1df David Malcolm

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).