From fa20614277e8454c9da868934ccc5d78a1056ad5 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 2 Dec 2020 19:20:03 -0500 Subject: [PATCH] Fix Ubuntu 16.04 LTS warning --- src/V3Partition.cpp | 3 ++- src/V3SplitVar.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/V3Partition.cpp b/src/V3Partition.cpp index 78ee3e236..c48f8737a 100644 --- a/src/V3Partition.cpp +++ b/src/V3Partition.cpp @@ -306,7 +306,8 @@ private: } void go() { // Generate a pseudo-random graph - std::array rngState = {0x12345678ULL, 0x9abcdef0ULL}; + std::array rngState + = {{0x12345678ULL, 0x9abcdef0ULL}}; // GCC 3.8.0 wants {{}} // Create 50 vertices for (auto& i : m_vx) i = new V3GraphVertex(&m_graph); // Create 250 edges at random. Edges must go from diff --git a/src/V3SplitVar.cpp b/src/V3SplitVar.cpp index 3d36af63d..83ae80e89 100644 --- a/src/V3SplitVar.cpp +++ b/src/V3SplitVar.cpp @@ -1006,7 +1006,8 @@ class SplitPackedVarVisitor final : public AstNVisitor, public SplitVarImpl { UASSERT_OBJ(varp->attrSplitVar(), varp, "split_var attribute must be attached"); std::array consts - = {VN_CAST(nodep->lsbp(), Const), VN_CAST(nodep->widthp(), Const)}; + = {{VN_CAST(nodep->lsbp(), Const), + VN_CAST(nodep->widthp(), Const)}}; // GCC 3.8.0 wants {{}} if (consts[0] && consts[1]) { // OK refit->second.append( PackedVarRefEntry(nodep, consts[0]->toSInt() + refit->second.basicp()->lsb(),