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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Akihiko Odaki from comment #11)
> So there are two constructs invoking UBs but ignored by UBSan: 1)

That is an understatement. UBSan is a best effort which diagnoses some forms of
undefined behavior.  There are tons of undefined behavior UBSan doesn't catch,
most importantly e.g. aliasing violations, but far from limited to just that.
If a program is diagnostic free with -fsanitize=undefined,address , it doesn't
mean it is UB free, but the goal is that if there is diagnostic, there is a
real UB in the program.

You are basically asking for the PR80797 fix to be reverted just because you
aren't willing to fix UB in your code.  That is not going to happen, we've been
diagnosing this for almost 7 years now, I think clang even for 11 years, it is
a real UB and other projects have been able to cope with it.  By reverting the
change new UB in other programs couldn't be discovered.

Reply via email to