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

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Roman Lebedev from comment #3)
> This is incorrect. 
> unsigned-integer-overflow is *NOT* enabled by -fsanitize=undefined
> It is enabled by -fsanitize=integer, separately.
> I'm not enabling it erroneously, but very intentionally.

But it still incorrectly claims there is undefined behaviour. Your own godbolt
link shows:

UndefinedBehaviorSanitizer: undefined-behavior ...

We've talked about this before, see PR 97844.

> All i'm asking is to improve the UX of the user-facing side
> of the C++ standard library implementation,
> and make it more usable by wider variety of the scenarios.

Please stop asking other people to work around broken tools that they don't use
themselves.

You want a workaround, propose a patch.

> In fact, this is a regression.
> This was not happening in libstdc++-11, or ever before.

The code is nearly a decade old, and you even commented on PR 97844 about it
happening in gcc 10. So I don't know where you get the idea it's new in gcc-12.

Reply via email to