According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59281 gcc 6 no
longer allows to use enum class as constructor priorities, as we did in
include/osv/prio.hh. Constructor priorities must be integers, and enum
class do not support conversion to int.

The solution is to go back to old-style enum, which do have conversion to
int. Put this enum inside a namespace so we can still use names like
init_prio::sched and don't need to change any of the callers.

Fixes #769

Signed-off-by: Nadav Har'El <n...@scylladb.com>
---
 include/osv/prio.hh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/osv/prio.hh b/include/osv/prio.hh
index 1a3d0eb..c3cb474 100644
--- a/include/osv/prio.hh
+++ b/include/osv/prio.hh
@@ -8,7 +8,8 @@
 #ifndef PRIO_HH_
 #define  PRIO_HH_
 
-enum class init_prio : int {
+namespace init_prio {
+enum {
     dtb = 101,
     console,
     sort,
@@ -32,5 +33,6 @@ enum class init_prio : int {
     malloc_pools,
     idt,
 };
+}
 
 #endif
-- 
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