diff options
author | Gabe Black <gabeblack@google.com> | 2020-01-29 23:49:32 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2020-02-01 09:25:30 +0000 |
commit | 5d3f1bfc48346f671c2b72ad06b3822c64457438 (patch) | |
tree | 3c1d6281fecfe5a8e067597be4ab722ddf94f44b /src/base/bitunion.hh | |
parent | f5e95d16e22f809457985318561e58facea7c57a (diff) | |
download | gem5-5d3f1bfc48346f671c2b72ad06b3822c64457438.tar.xz |
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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24926
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/base/bitunion.hh')
-rw-r--r-- | src/base/bitunion.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh index 1a32991a8..1eec1e2a8 100644 --- a/src/base/bitunion.hh +++ b/src/base/bitunion.hh @@ -86,6 +86,9 @@ class BitfieldTypeImpl : public Base 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 @@ class BitfieldType : public BitfieldTypeImpl<Base> 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 @@ class BitfieldROType : public BitfieldTypeImpl<Base> 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 @@ class BitfieldWOType : public BitfieldTypeImpl<Base> 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 @@ namespace BitfieldBackend Base::__storage = val; } + BitUnionOperators(const BitUnionOperators &) = default; + BitUnionOperators() {} operator const typename Base::__StorageType () const |