summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2020-01-29 23:50:25 -0800
committerGabe Black <gabeblack@google.com>2020-01-31 09:03:42 +0000
commitd63743699b00647fc34f435ec9da41331baf9657 (patch)
tree7550bb1bb1cb4a9ed593618f89e40fb18f4d285e
parent994c72948e32a6ee1052c1c2948b2a230b031ec8 (diff)
downloadgem5-d63743699b00647fc34f435ec9da41331baf9657.tar.xz
mem: Make slicc generate some default methods explicitly.
Implicitly using the default copy constructor and assignment operator is apparently deprecated, and gcc 9 will warn about it, breaking the build. Change-Id: Ida7a8a577e9d1cde9841eac7eee1af74563f1e27 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24927 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com> Reviewed-by: John Alsop <johnathan.alsop@amd.com> Maintainer: Bradford Beckmann <brad.beckmann@amd.com>
-rw-r--r--src/mem/slicc/symbols/Type.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py
index c4d8eae06..8464544e9 100644
--- a/src/mem/slicc/symbols/Type.py
+++ b/src/mem/slicc/symbols/Type.py
@@ -258,6 +258,13 @@ $klass ${{self.c_ident}}$parent
code.dedent()
code('}')
+ else:
+ code('${{self.c_ident}}(const ${{self.c_ident}}&) = default;')
+
+ # ******** Assignment operator ********
+
+ code('${{self.c_ident}}')
+ code('&operator=(const ${{self.c_ident}}&) = default;')
# ******** Full init constructor ********
if not self.isGlobal: