diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index e3d03d24b..c1799b6fb 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -2890,13 +2890,13 @@ void EmitCStmts::emitSortedVarList(const VarVec& anons, const VarVec& nonanons, if (anonL1s != 1) puts("// Anonymous structures to workaround compiler member-count bugs\n"); auto it = anons.cbegin(); - for (int l3 = 0; l3 < anonL3s && it != anons.end(); ++l3) { + for (int l3 = 0; l3 < anonL3s && it != anons.cend(); ++l3) { if (anonL3s != 1) puts("struct {\n"); - for (int l2 = 0; l2 < anonL2s && it != anons.end(); ++l2) { + for (int l2 = 0; l2 < anonL2s && it != anons.cend(); ++l2) { if (anonL2s != 1) puts("struct {\n"); - for (int l1 = 0; l1 < anonL1s && it != anons.end(); ++l1) { + for (int l1 = 0; l1 < anonL1s && it != anons.cend(); ++l1) { if (anonL1s != 1) puts("struct {\n"); - for (int l0 = 0; l0 < lim && it != anons.end(); ++l0) { + for (int l0 = 0; l0 < lim && it != anons.cend(); ++l0) { const AstVar* varp = *it; emitVarCmtChg(varp, &curVarCmt); emitVarDecl(varp, prefixIfImp); diff --git a/src/V3Number.cpp b/src/V3Number.cpp index 902f1b2b6..2b4e54494 100644 --- a/src/V3Number.cpp +++ b/src/V3Number.cpp @@ -578,7 +578,7 @@ string V3Number::displayed(FileLine* fl, const string& vformat) const { ++pos; } string fmtsize; - for (; pos != vformat.end() && (isdigit(pos[0]) || pos[0] == '.'); ++pos) { + for (; pos != vformat.cend() && (isdigit(pos[0]) || pos[0] == '.'); ++pos) { fmtsize += pos[0]; } string str; diff --git a/src/V3Partition.cpp b/src/V3Partition.cpp index d8937484e..e15e06c20 100644 --- a/src/V3Partition.cpp +++ b/src/V3Partition.cpp @@ -1502,9 +1502,9 @@ private: // to cart around. Just make a few pairs. auto it = shortestPrereqs.cbegin(); for (unsigned i = 0; exhaustive || (i < 3); ++i) { - if (it == shortestPrereqs.end()) break; + if (it == shortestPrereqs.cend()) break; LogicMTask* ap = *(it++); - if (it == shortestPrereqs.end()) break; + if (it == shortestPrereqs.cend()) break; LogicMTask* bp = *(it++); makeSiblingMC(ap, bp); } diff --git a/src/V3Simulate.h b/src/V3Simulate.h index 870ca1da2..a2f1eb6f5 100644 --- a/src/V3Simulate.h +++ b/src/V3Simulate.h @@ -1011,7 +1011,7 @@ private: string format = nodep->text(); auto pos = format.cbegin(); bool inPct = false; - for (; pos != format.end(); ++pos) { + for (; pos != format.cend(); ++pos) { if (!inPct && pos[0] == '%') { inPct = true; } else if (!inPct) { // Normal text diff --git a/test_regress/t/t_flag_make_cmake.pl b/test_regress/t/t_flag_make_cmake.pl index c4b3d0ebe..ba6828b85 100755 --- a/test_regress/t/t_flag_make_cmake.pl +++ b/test_regress/t/t_flag_make_cmake.pl @@ -16,8 +16,7 @@ compile( verilator_make_cmake => 1, ); -system("cmake --version"); -if ($? != 0) { +if (!$Self->have_cmake) { skip("cmake is not installed"); } else { my $cmakecache = $Self->{obj_dir}."/CMakeCache.txt"; diff --git a/test_regress/t/t_hier_block_cmake.pl b/test_regress/t/t_hier_block_cmake.pl index 1669509c0..24760fe3c 100755 --- a/test_regress/t/t_hier_block_cmake.pl +++ b/test_regress/t/t_hier_block_cmake.pl @@ -27,8 +27,7 @@ compile( ($Self->{vltmt} ? ' --threads 6' : '')], ); -system("cmake --version"); -if ($? != 0) { +if (!$Self->have_cmake) { skip("cmake is not installed"); } else { my $cmakecache = $Self->{obj_dir}."/CMakeCache.txt";