From: Nadav Har'El <[email protected]>
Committer: Nadav Har'El <[email protected]>
Branch: master

aarch64: fix compilation on gcc 6

Gcc 6 doesn't like the member "x" being redefined, and starts
complaining about its visibility. If it's just a shortcut we want,
let's just use auto& and not a member. This revives "make ARCH=aarch64"
on gcc 6.2.1.

Signed-off-by: Nadav Har'El <[email protected]>

---
diff --git a/arch/aarch64/arch-mmu.hh b/arch/aarch64/arch-mmu.hh
--- a/arch/aarch64/arch-mmu.hh
+++ b/arch/aarch64/arch-mmu.hh
@@ -37,19 +37,19 @@ public:

     /* false->non-shareable true->Inner Shareable */
     inline void set_share(bool v) {
+        auto& x=pt_element_common<N>::x;
         x &= ~(3ul << 8);
         if (v)
             x |= (3ul << 8);
     }

     // mair_el1 register defines values for each 8 indexes. See boot.S
     inline void set_attridx(unsigned char c) {
+        auto& x=pt_element_common<N>::x;
         assert(c <= 7);
         x &= ~(7ul << 2);
         x |= (c << 2);
     }
-private:
-    using pt_element_common<N>::x;
 };


--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to