[Bug ipa/66223] [5/6 Regression] Diagnostic of pure virtual function call broken, including __cxa_pure_virtual

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 19 13:24:00 GMT 2016


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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think it is a bad idea to pessimize code just because it might be invoking
undefined behavior.  I'd really do this only if the user asked for that, and
IMHO such a switch is flag_sanitize & SANITIZE_UNREACHABLE (or we could add
-fsanitize=pure-virtual, part of -fsanitize=undefined), which would just
disable such optimizations (i.e. unless proven pure virtual might not be
called, don't remove it from the candidates).


More information about the Gcc-bugs mailing list