Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/24926 )

Change subject: arch,base,cpu: Add some default constructors/operators explicitly.
......................................................................

arch,base,cpu: Add some default constructors/operators explicitly.

Having them implicitly is apparently deprecated and throws a warning
in gcc 9, breaking the build.

Change-Id: Id4e3074966d1ffc6dd1aed9397de5eea84400027
---
M src/arch/alpha/pagetable.hh
M src/arch/generic/vec_pred_reg.hh
M src/arch/generic/vec_reg.hh
M src/base/bitunion.hh
M src/cpu/inst_res.hh
5 files changed, 21 insertions(+), 0 deletions(-)



diff --git a/src/arch/alpha/pagetable.hh b/src/arch/alpha/pagetable.hh
index dc13d37..e94aa46 100644
--- a/src/arch/alpha/pagetable.hh
+++ b/src/arch/alpha/pagetable.hh
@@ -45,6 +45,7 @@

     Addr addr;

+    VAddr(const VAddr &) = default;
     VAddr(Addr a) : addr(a) {}
     operator Addr() const { return addr; }
     const VAddr &operator=(Addr a) { addr = a; return *this; }
@@ -63,6 +64,7 @@

 struct PageTableEntry
 {
+    PageTableEntry(const PageTableEntry &) = default;
     PageTableEntry(uint64_t e) : entry(e) {}
     uint64_t entry;
     operator uint64_t() const { return entry; }
@@ -103,6 +105,8 @@
     bool valid;             // valid page table entry


+    TlbEntry(const TlbEntry &) = default;
+
     //Construct an entry that maps to physical address addr.
     TlbEntry(Addr _asn, Addr _vaddr, Addr _paddr,
              bool uncacheable, bool read_only)
diff --git a/src/arch/generic/vec_pred_reg.hh b/src/arch/generic/vec_pred_reg.hh
index 9ff9915..2f51d18 100644
--- a/src/arch/generic/vec_pred_reg.hh
+++ b/src/arch/generic/vec_pred_reg.hh
@@ -248,6 +248,7 @@

   public:
     VecPredRegContainer() {}
+    VecPredRegContainer(const VecPredRegContainer &) = default;

     MyClass&
     operator=(const MyClass& that)
diff --git a/src/arch/generic/vec_reg.hh b/src/arch/generic/vec_reg.hh
index aab307b..948fec9 100644
--- a/src/arch/generic/vec_reg.hh
+++ b/src/arch/generic/vec_reg.hh
@@ -284,6 +284,7 @@

   public:
     VecRegContainer() {}
+    VecRegContainer(const VecRegContainer &) = default;
     /* This is required for de-serialisation. */
     VecRegContainer(const std::vector<uint8_t>& that)
     {
diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index 1a32991..1eec1e2 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -86,6 +86,9 @@
     Type getter(const Storage &storage) const = delete;
     void setter(Storage &storage, Type val) = delete;

+    BitfieldTypeImpl() = default;
+    BitfieldTypeImpl(const BitfieldTypeImpl &) = default;
+
     Storage __storage;

     operator Type () const
@@ -116,6 +119,9 @@
     using typename Impl::Type;

   public:
+    BitfieldType() = default;
+    BitfieldType(const BitfieldType &) = default;
+
     operator Type () const { return Impl::operator Type(); }
     Type operator=(const Type val) { return Impl::operator=(val); }
     Type
@@ -133,6 +139,9 @@
     using Impl = BitfieldTypeImpl<Base>;
     using typename Impl::Type;

+    BitfieldROType() = default;
+    BitfieldROType(const BitfieldROType &) = default;
+
     Type operator=(BitfieldROType<Base> const &other) = delete;
     operator Type () const { return Impl::operator Type(); }
 };
@@ -146,6 +155,9 @@
     using typename Impl::Type;

   public:
+    BitfieldWOType() = default;
+    BitfieldWOType(const BitfieldWOType &) = default;
+
     Type operator=(const Type val) { return Impl::operator=(val); }
     Type
     operator=(BitfieldWOType<Base> const & other)
@@ -244,6 +256,8 @@
             Base::__storage = val;
         }

+        BitUnionOperators(const BitUnionOperators &) = default;
+
         BitUnionOperators() {}

         operator const typename Base::__StorageType () const
diff --git a/src/cpu/inst_res.hh b/src/cpu/inst_res.hh
index bf9c649..d2ac302 100644
--- a/src/cpu/inst_res.hh
+++ b/src/cpu/inst_res.hh
@@ -75,6 +75,7 @@
   public:
     /** Default constructor creates an invalid result. */
     InstResult() : type(ResultType::Invalid) { }
+    InstResult(const InstResult &) = default;
     /** Scalar result from scalar. */
     template<typename T>
     explicit InstResult(T i, const ResultType& t) : type(t) {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/24926
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Id4e3074966d1ffc6dd1aed9397de5eea84400027
Gerrit-Change-Number: 24926
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to