From: Nadav Har'El <n...@scylladb.com> Committer: Nadav Har'El <n...@scylladb.com> Branch: master
Do not assume enum class can be implicitly convert to int An enum class can be explicitly converted to the underlying int, using a static_cast<int>, but this conversion does not happen implicitly, and gcc 6 is even stricter about this than the previous versions of the compiler. Signed-off-by: Nadav Har'El <n...@scylladb.com> Message-Id: <1469056630-17663-1-git-send-email-...@scylladb.com> --- diff --git a/arch/x64/apic.hh b/arch/x64/apic.hh --- a/arch/x64/apic.hh +++ b/arch/x64/apic.hh @@ -43,9 +43,9 @@ enum class apicreg { }; enum class apiclvt { - timer = apicreg::LVTT, - lint0 = apicreg::LVT0, - lint1 = apicreg::LVT1, + timer = static_cast<int>(apicreg::LVTT), + lint0 = static_cast<int>(apicreg::LVT0), + lint1 = static_cast<int>(apicreg::LVT1), }; enum msi_data_fields { -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.