Re: Pb on gcc : no warning on information lost.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux