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

--- Comment #9 from Daniel Marjamäki <daniel.marjamaki at gmail dot com> ---
Problems;

 * Code that performs comparison properly gets a warning.

 * Code where programmer makes a mistake with a cast does not generate a
warning.

 * This warning encourage programmers to cast and when they do make mistakes
sometimes there is no warning.

Yet you think this is all fine and you are happy about these problems.

It's safer to shut off this warning and use better tools to find these issues.
The casts will silence i.e. Cppcheck so it's safer to avoid the casts (it can't
know if loss of data is by intention or by mistake when you tried to perform a
sign-cast).

Reply via email to