Bobby R. Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/29294 )

Change subject: misc,sim: Fixed std::array bracket compiler error
......................................................................

misc,sim: Fixed std::array bracket compiler error

For versions of Clang before 6.0, Clang returns an error if and
std::array initialization is not encompassed in two sets of
encompassing braces. This is a known compiler bug:
https://bugs.llvm.org/show_bug.cgi?id=21629.

As we support Clang 3.9 onwards, we are required to include these
redundant braces to ensure compilation. They do not produce any
ill-effects when using later clang compilers or with any GCC compiler
gem5 presently supports.

Change-Id: Ia512a9b9f583b1cfa28f9fc4c24f6e202e46b4cb
Issue-on: https://gem5.atlassian.net/browse/GEM5-563
---
M src/sim/pseudo_inst.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index b11a5a4..203afc0 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -285,7 +285,7 @@
     char key[len];
     memset(key, '\0', len);

-    std::array<uint64_t, 2> key_regs = { key_str1, key_str2 };
+    std::array<uint64_t, 2> key_regs = {{ key_str1, key_str2 }};
     key_regs = letoh(key_regs);
     memcpy(key, key_regs.data(), sizeof(key_regs));


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

Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v20.0.0.0
Gerrit-Change-Id: Ia512a9b9f583b1cfa28f9fc4c24f6e202e46b4cb
Gerrit-Change-Number: 29294
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to