From: Gabe Black Date: Thu, 30 Jan 2020 07:50:25 +0000 (-0800) Subject: mem: Make slicc generate some default methods explicitly. X-Git-Tag: v19.0.0.0~62 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d63743699b00647fc34f435ec9da41331baf9657;p=gem5.git 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 Reviewed-by: Jason Lowe-Power Reviewed-by: Bradford Beckmann Reviewed-by: John Alsop Maintainer: Bradford Beckmann --- 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: