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>
---
 arch/x64/apic.hh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x64/apic.hh b/arch/x64/apic.hh
index 8745c31..9300e09 100644
--- 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 {
-- 
2.5.5

-- 
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.

Reply via email to