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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Roman Lebedev from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > unsigned integer overflow DOES NOT EXIST.  It is called wrapping only.
> 
> > This is NOT undefined at all.
> I agree, and no one said it's undefined.

Erm ...

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:403:51
in 

Am I hallucinating?

> > clang is broken.
> 
> It's not, actually.
> `-fsanitize=undefined` does *NOT* warn on that,
> `-fsanitize=integer` does, and it's explicitly marketed as sanitizing
> some behavior that is explicitly *NOT* UB, but very often unintentional.

So the UBsan output needs to be fixed.

> So the bugreport is correct in a way,
> libstdc++ for -std=c++20 contains `-fsanitize=integer` issues.

Not a bug.

Reply via email to