------- Comment #2 from manu at gcc dot gnu dot org 2007-03-12 22:25 ------- Wconversion is implemented in the front-end and there is no data-flow solving on front-ends, so basically it is impossible to know the value of i.
In addition, up to GCC 4.3, Wconversion was not meant to warn about signed->unsigned conversion, just for the negative constant case. From GCC 4.3, the behaviour of Wconversion will change. See http://gcc.gnu.org/wiki/NewWconversion However, the new Wconversion will not produce warnings for signedness change as in your testcase, since it results in too many warnings in real-world code (Mozilla, libstdc++, Linux kernel, etc). -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu dot org Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31153