<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:kenton@sandstorm.io" title="Kenton Varda &lt;kenton&#64;sandstorm.io&gt;"> <span class="fn">Kenton Varda</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_REOPENED " title="REOPENED --- - Clang and GCC disagree about triviality of type with defaulted non-const copy constructor (breaks ABI!)" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23764&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=5QkoDKyUyCc-j_9iavBb446xpGpS4AuJBmZbJ2FHlAk&s=j86HrxK085BN-Hza2VN85b-9uY3FGrz6UlhhaanjL_U&e=">bug 23764</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>DUPLICATE
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED " title="REOPENED --- - Clang and GCC disagree about triviality of type with defaulted non-const copy constructor (breaks ABI!)" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23764-23c2&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=5QkoDKyUyCc-j_9iavBb446xpGpS4AuJBmZbJ2FHlAk&s=jU2SOW1agKzQjfBuCS1pbz4EPrkUtCQa0JOOhXlHhQI&e=">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED " title="REOPENED --- - Clang and GCC disagree about triviality of type with defaulted non-const copy constructor (breaks ABI!)" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23764&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=5QkoDKyUyCc-j_9iavBb446xpGpS4AuJBmZbJ2FHlAk&s=j86HrxK085BN-Hza2VN85b-9uY3FGrz6UlhhaanjL_U&e=">bug 23764</a>
              from <span class="vcard"><a class="email" href="mailto:kenton@sandstorm.io" title="Kenton Varda &lt;kenton&#64;sandstorm.io&gt;"> <span class="fn">Kenton Varda</span></a>
</span></b>
        <pre>I don't think this is a duplicate of <a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - incorrect result for is_trivially_copyable on class with deleted destructor" href="show_bug.cgi?id=21010">bug 21010</a>. They both describe problems
related to copy triviality, but that bug describes a problem with destructors,
whereas this bug describes a different problem with constructors.

Moreover, this bug describes an ABI incompatibility with GCC which is causing
real-world crashes when trying to link a clang-built binary against a GCC-built
library or vice versa with valid code. In contrast, <a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - incorrect result for is_trivially_copyable on class with deleted destructor" href="show_bug.cgi?id=21010">bug 21010</a> describes a case
that I don't think could lead to an ABI problem with valid code (since it
describes a class that shouldn't be allowed to be passed by value in the first
place).

This ABI incompatibility is the primary concern in my bug. (I think my class C
may actually be non-trivially-copyable according to the standard, but that's
not primarily what I care about.)

It does seem like Richard's proposed rule would (perhaps accidentally?) solve
the problem:

<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.open-2Dstd.org_jtc1_sc22_wg21_docs_cwg-5Factive.html-231590&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=5QkoDKyUyCc-j_9iavBb446xpGpS4AuJBmZbJ2FHlAk&s=VfG5SXJ_DYsV_0lRh13uaYD8lMtjOo5YbQKZVIJsBOE&e=">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1590</a>

This would at least solve the problem in my use cases because all my classes
that have a default non-const copy constructor also have a trivial move
constructor. It doesn't completely solve the problem in the case of a class
with non-trivial move constructor, but that does seem like an odd case.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>