http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51625
Yichao Zhou <broken.zhou at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |broken.zhou at gmail dot | |com --- Comment #4 from Yichao Zhou <broken.zhou at gmail dot com> 2012-04-29 12:16:54 UTC --- I run into this problem today too. Why gcc do not warning by default when we assign a double to a int? This is even not warned by Wall and Wextra. If you google the internet, you will find there are many users asking this question. > This tied with the fact that there is no data-flow in front-ends (see next > question) results in hard to avoid warnings for perfectly working and valid > code. This is not convincing for me. Since I think you should do these conversion explicitly to tell others you know what you are doing. I hope that there is a day that the developer can change their mind on this question:)