https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59246
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=115435
Last reconfirmed|2021-11-10 00:00:00 |2024-6-11
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
On further thought, I think GCC's behaviour of calling the definition if one
exists is reasonable (possibly better than aborting the process by calling
__cxa_pure_virtual). But when UBsan is active we should diagnose it as
requested.
Clang doesn't seem to handle this in UBsan, it just always calls
__cxa_pure_virtual.
I stated in comment 2 that GCC does give a warning about this even if it
doesn't diagnose it at runtime. That's only true for a direct call, for
indirect calls to the pure virtual function there's no warning, see PR 115435