https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121717

            Bug ID: 121717
           Summary: free-nonheap-object warning if the base class has
                    destroying delete
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fujii.hironori at gmail dot com
  Target Milestone: ---

Created attachment 62229
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62229&action=edit
repro.cpp

GCC reports a bogus warning. Clang doesn't.

https://godbolt.org/z/qqWKanvGT

<source>: In destructor 'virtual X::~X()':
<source>:18:1: warning: 'static void A::operator delete(A*,
std::destroying_delete_t, std::size_t)' called on pointer '<unknown>' with
nonzero offset 8 [-Wfree-nonheap-object]
   18 | }
      | ^

Reply via email to