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 >