<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:moko@design.ru" title="Konstantin Morshnev <moko@design.ru>"> <span class="fn">Konstantin Morshnev</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Delete called in virtual destructor"
   href="https://bugs.llvm.org/show_bug.cgi?id=35517">bug 35517</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;">Resolution</td>
           <td>INVALID
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Delete called in virtual destructor"
   href="https://bugs.llvm.org/show_bug.cgi?id=35517#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Delete called in virtual destructor"
   href="https://bugs.llvm.org/show_bug.cgi?id=35517">bug 35517</a>
              from <span class="vcard"><a class="email" href="mailto:moko@design.ru" title="Konstantin Morshnev <moko@design.ru>"> <span class="fn">Konstantin Morshnev</span></a>
</span></b>
        <pre><span class="quote">> has a good description of deleting destructors.</span >

The description is clear and we know it. But it is about dynamic objects
(MyStruct *ss=new MyStruct), and we have a stack object (MyStruct ss).

And if you'll and some printfs (like <a href="https://godbolt.org/g/fW4QZk">https://godbolt.org/g/fW4QZk</a>) you'll see,
that delete is not called. It looks like there are two destructor versions are
generated - one with delete call and one without. But if the one with delete is
not referenced, why it is not optimized out?

<span class="quote">> FWIW, your testcase only compiles in GCC 6.1 because they changed their default standard mode to C++14</span >

Thx for this note.

P.S. As a workaround we are temporary disabling virtual destructors to check
that build-in delete is not used in our code, but it's not very convenient.</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>