public inbox for gcc-cvs-wwwdocs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@sourceware.org>
To: gcc-cvs-wwwdocs@gcc.gnu.org
Subject: gcc-wwwdocs branch master updated. f1d2be6c9fcc52d676266e7ede123953d150aaf3
Date: Thu,  7 May 2020 10:24:56 +0000 (GMT)	[thread overview]
Message-ID: <20200507102456.617A0395A40E@sourceware.org> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3861 bytes --]

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  f1d2be6c9fcc52d676266e7ede123953d150aaf3 (commit)
      from  01424bc265a033851b93d0ce0e84df3ce519f429 (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 f1d2be6c9fcc52d676266e7ede123953d150aaf3
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu May 7 11:24:04 2020 +0100

    Document C++17 ABI changes in GCC 10

diff --git a/htdocs/gcc-10/changes.html b/htdocs/gcc-10/changes.html
index f5b70eb4..52fd6e6a 100644
--- a/htdocs/gcc-10/changes.html
+++ b/htdocs/gcc-10/changes.html
@@ -30,6 +30,12 @@ a work-in-progress.</p>
 <!-- .................................................................. -->
 <h2>Caveats</h2>
 <ul>
+  <li>
+    An ABI incompatibility between C++14 and C++17 has been fixed.  On some
+    targets a class with a zero-sized subobject would be passed incorrectly
+    when compiled as C++17 or C++20.
+    See the <a href="#empty_base">C++ notes below</a> for more details.
+  </li>
   <li>
     The deprecated Profile Mode and <code>array_allocator</code> extensions
     have been removed from libstdc++.
@@ -409,6 +415,39 @@ int get_naïve_pi() {
     The attribute <code>deprecated</code> can now be used on
     <code>namespace</code>s too.
   </li>
+  <li>
+    <a name="empty_base">The ABI</a>
+    of passing and returning certain C++ classes by value changed
+    on several targets in GCC 10, including
+    <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94383">AArch64</a>,
+    <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94711">ARM</a>,
+    <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94383">PowerPC ELFv2</a>,
+    <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94704">S/390</a>
+    and
+    <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94706">Itanium</a>.
+    These changes affect classes with a zero-sized
+    subobject (an empty base class, or data member with the
+    <code>[[no_unique_address]]</code> attribute) where all other non-static
+    data members have the same type (this is called a "homogeneous aggregate"
+    in some ABI specifications, or if there is only one such member,
+    a "single element").
+    In <code>-std=c++17</code> and <code>-std=c++20</code> modes, classes with
+    an empty base class were not considered to have a single element or
+    to be a homogeneous aggregate, and so could be passed differently
+    (in the wrong registers or at the wrong stack address). This could make
+    code compiled with <code>-std=c++17</code> and <code>-std=c++14</code>
+    ABI incompatible.  This has been corrected and the empty bases are
+    ignored in those ABI decisions, so functions compiled with
+    <code>-std=c++14</code> and <code>-std=c++17</code> are now ABI compatible
+    again.
+    Example:
+    <code>struct empty {}; struct S : empty { float f; }; void f(S);</code>.
+    Similarly, in classes containing non-static data members with empty
+    class types using the C++20 <code>[[no_unique_address]]</code> attribute,
+    those members weren't ignored in the ABI argument passing decisions
+    as they should be.  Both of these ABI changes are now diagnosed with
+    <code>-Wpsabi</code>.
+  </li>
 </ul>
 
 <h4 id="libstdcxx">Runtime Library (libstdc++)</h4>

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

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


hooks/post-receive
-- 
gcc-wwwdocs


                 reply	other threads:[~2020-05-07 10:24 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=20200507102456.617A0395A40E@sourceware.org \
    --to=redi@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).