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

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
My guess is that we don't want to warn about conversions that are well-defined
and the original value can be obtained by a round-trip. Converting a size_t to
an int is lossy, i.e. converting back to size_t may not give the original
value. But converting an int to size_t and back to an int is value preserving.

So I can see why it makes sense to have different warnings for lossy and
non-lossy conversions.

Reply via email to