Re: gcc warning about return value truncation

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

 



在 2019/12/29 13:11, Yubin Ruan 写道:
> Is there any gcc flag to warn about this?
> 
> 
> The return value of func() was truncated because the return type is
> accidentally written as int16_t
> 


It's `-Wconversion`. By the way I suggest you add `-Wsign-conversion` in
C++ as well.


-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature


[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