Re: gcc warning about return value truncation

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

 



Thanks a lot.

On Sun, Dec 29, 2019 at 2:29 PM Liu Hao <lh_mouse@xxxxxxx> wrote:
>
> 在 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
>




[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