Re: gcc warn C++ implicit enum conversion

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

 





On 02/07/2019 08:47, Jonathan Wakely wrote:
On Mon, 1 Jul 2019 at 23:40, Jonny Grant wrote:

Hi
Is there any way to warn on enum conversion to int?

I don't think so.

I'd just use 'enum class' so the conversion is forbidden, and insert
explicit casts where you want the conversion to compile.


Thank you. I better update codebase to use 'enum class' to get these warnings.

Thanks, Jonny



[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