Re: Question about a warning message

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

 



On Thu, 6 Sep 2018 at 20:30, Juan Cabrera <jjcp.91@xxxxxxxxx> wrote:
>
> Hello!
>
> Thank you for your answers.
> I'm aware that you can cast anything into an `enum class` but I
> thought that casting a non valid enum-class value into an enum-class
> was itself "wrong" or "unedfined behavior" or something like that :D.

No, because for an enum class all values of the underlying type are
valid values of the enum.

The compiler is right to warn.



[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