Hello gem5-dev list,

I've been trying to get gem5 to build on my system with gcc-9.2.0 or
clang-9 without just downgrading errors / disabling warnings.

A pervasive issue I'm hitting is that recent releases of gcc/clang are
starting to emit errors for a little-known c++11 requirement:

> The implicit definition of a copy constructor as defaulted is deprecated
> if the class has a user-declared copy assignment operator or a
> user-declared destructor. The implicit definition of a copy assignment
> operator as defaulted is deprecated if the class has a user-declared
> copy constructor or a user-declared destructor.

(see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58407 )

tl;dr: gem5 needs a bunch of boilerplate of the form:

Foo& operator=(const Foo&) = default;
  or
Foo(const Foo&) = default;

I have submitted a couple commits to gerrit that handle this and some
other warnings: 21279 21280 21281, but they are far from complete, and
maybe incorrect. I'm currently stuck trying to figure out what the code
under `src/base/bitunion.hh` is doing and what sort of modification it
needs for a default constexpr copy constructor. If someone more familiar
could take a look, I'd appreciate it.

Best,
Nicholas
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to