Fix Ubuntu 16.04 LTS warning

This commit is contained in:
Wilson Snyder 2020-12-02 19:20:03 -05:00
parent 1e69167191
commit fa20614277
2 changed files with 4 additions and 2 deletions

View File

@ -306,7 +306,8 @@ private:
}
void go() {
// Generate a pseudo-random graph
std::array<vluint64_t, 2> rngState = {0x12345678ULL, 0x9abcdef0ULL};
std::array<vluint64_t, 2> 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

View File

@ -1006,7 +1006,8 @@ class SplitPackedVarVisitor final : public AstNVisitor, public SplitVarImpl {
UASSERT_OBJ(varp->attrSplitVar(), varp, "split_var attribute must be attached");
std::array<AstConst*, 2> 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(),