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

--- Comment #5 from JunMa <JunMa at linux dot alibaba.com> ---
(In reply to Martin Sebor from comment #4)
> You're right that the conversion from int128_t to unsigned long can result
> in truncation, so the range of the result is that of unsigned long.  Yet I
> suspect that relying on it is more likely unintentional and a bug.  The
> question in my mind is whether narrowing int128_t conversions should be
> diagnosed just in these contexts (i.e., -Wstringop-overflow) or in others as
> well.

We have no idea whether these truncations is intentional or not in gcc side,
maybe we need a new option such as Wstringop-truncation to do this.

Reply via email to