[Bug c++/98988] delete is not a constant expression with -fsanitize=undefined

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 8 15:29:35 GMT 2021


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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Some sanitizers imply -fno-delete-null-pointer-checks and this testcase fails
with  fno-delete-null-pointer-checks too - the &heap_magic_var_decl != NULL
comparison in that case which is done on delete is not folded into true.
Wonder if at least for the magic heap vars we shouldn't fold comparisons
against NULL, because those will never live in any memory and thus we can
pretend their address will never be 0.


More information about the Gcc-bugs mailing list