missing destructor in classes, CLANG issue #16685

issue BlockMechanic openend this issue on August 22, 2019
  1. BlockMechanic commented at 8:24 pm on August 22, 2019: contributor

    When compiling with clang (android build, may also affect macOS), i get a repeated warning :- warning: destructor called on non-final 'CBlockHeader' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]

    It can be reproduced using ndk 20 and all api above 24 so far. Unavoidable because google has deprecated use of GCC and only clang remains.

  2. sipa commented at 8:27 pm on August 22, 2019: member
    CBlockHeader does not have any virtual functions?
  3. BlockMechanic commented at 9:04 pm on August 22, 2019: contributor
    It has, and it is fine when i use native gcc on ubuntu , but all builds for android now require clang, and the latest ndk uses a recent version of which introduced -Wdelete-non-virtual-dtor
  4. sipa commented at 9:56 pm on August 22, 2019: member
    I don’t see any virtual functions, and it shouldn’t have any.
  5. BlockMechanic commented at 5:30 am on August 23, 2019: contributor

    none declared yet for some reason the warning pops up.

    Build system is ubuntu 18.04 using depends sytem to compile for android arch x86 ndk 20 api level 24 & higher

  6. hebasto commented at 5:49 am on August 23, 2019: member
    @BlockMechanic which version of Clang produces those warnings?
  7. laanwj added the label Android on Sep 30, 2019
  8. laanwj added the label Upstream on Sep 30, 2019
  9. laanwj commented at 11:34 am on September 30, 2019: member
    Neither CBlockHeader nor anything derived from it should have virtual functions. If it does, that’s a bug. Can you get more verbose output from your compiler somehow?
  10. fanquake commented at 5:03 am on March 2, 2020: member
    Going to close this due to no followup. We can re-open here if/when more info is provided.
  11. fanquake closed this on Mar 2, 2020

  12. MarcoFalke locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me