On 14 April 2014 11:24, Andrew Haley <aph@xxxxxxxxxx> wrote: > [Redirect to gcc-help. The gcc list is for the development of GCC.] > > On 04/14/2014 10:11 AM, Yves Mocquard wrote: >> long long fct() >> { >> return 0x123456789; >> } >> int main() >> { >> int a = fct(); >> cerr << a << endl; >> } > > `-Wconversion' is the warning you want. This warning is not enabled > by default because it produces too many warnings on good code. There are a couple of bugs that if fixed will significantly reduce the noise of -Wconversion. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38522 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752 Cheers, Manuel.