From ea9b65fe6daa8b7f1546330b473aad308dc95764 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 16 Aug 2020 15:10:43 -0400 Subject: [PATCH] Hardcode VM_C11 as always need C++11 now --- docs/internals.adoc | 6 ++---- src/V3EmitCInlines.cpp | 1 - src/V3EmitMk.cpp | 7 ++----- src/V3Global.h | 3 --- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/docs/internals.adoc b/docs/internals.adoc index 22dbd1ad4..8b7cbd765 100644 --- a/docs/internals.adoc +++ b/docs/internals.adoc @@ -387,10 +387,8 @@ changed; if clear, checking those signals for changes may be skipped. === Compiler Version and C++11 -Verilator supports GCC 4.4.7 and newer. GCC 4.4.7 does not support C++11, -therefore C++11 is generally not required. Exceptions may be made to -require C++11 for features that are only practical with C++11, -e.g. threads. +Verilator requires C++11. Verilator does not require any newer versions, +but is maintained to build successfully with C++14/C++17/C++20. === Indentation and Naming Style diff --git a/src/V3EmitCInlines.cpp b/src/V3EmitCInlines.cpp index 1a04d51bc..eb91000d0 100644 --- a/src/V3EmitCInlines.cpp +++ b/src/V3EmitCInlines.cpp @@ -37,7 +37,6 @@ class EmitCInlines : EmitCBaseVisitor { // VISITORS virtual void visit(AstClass* nodep) override { checkHeavy(nodep); - v3Global.needC11(true); iterateChildren(nodep); } virtual void visit(AstCNew* nodep) override { diff --git a/src/V3EmitMk.cpp b/src/V3EmitMk.cpp index f960f50a0..c74c1edd1 100644 --- a/src/V3EmitMk.cpp +++ b/src/V3EmitMk.cpp @@ -47,11 +47,8 @@ public: of.puts("# See " + v3Global.opt.prefix() + ".mk" + " for the caller.\n"); of.puts("\n### Switches...\n"); - of.puts("# C11 constructs required? 0/1 (from --threads, " - "--trace-threads or use of classes)\n"); - of.puts("VM_C11 = "); - of.puts(v3Global.needC11() || v3Global.opt.threads() ? "1" : "0"); - of.puts("\n"); + of.puts("# C11 constructs required? 0/1 (always on now)\n"); + of.puts("VM_C11 = 1\n"); of.puts("# Coverage output mode? 0/1 (from --coverage)\n"); of.puts("VM_COVERAGE = "); of.puts(v3Global.opt.coverage() ? "1" : "0"); diff --git a/src/V3Global.h b/src/V3Global.h index 7c307ba5c..605fb83a8 100644 --- a/src/V3Global.h +++ b/src/V3Global.h @@ -76,7 +76,6 @@ class V3Global { int m_debugFileNumber = 0; // Number to append to debug files created bool m_assertDTypesResolved = false; // Tree should have dtypep()'s bool m_constRemoveXs = false; // Const needs to strip any Xs - bool m_needC11 = false; // Need C++11 bool m_needHeavy = false; // Need verilated_heavy.h include bool m_needTraceDumper = false; // Need __Vm_dumperp in symbols bool m_dpi = false; // Need __Dpi include files @@ -122,8 +121,6 @@ public: sprintf(digits, "%03d", m_debugFileNumber); return opt.hierTopDataDir() + "/" + opt.prefix() + "_" + digits + "_" + nameComment; } - bool needC11() const { return m_needC11; } - void needC11(bool flag) { m_needC11 = flag; } bool needHeavy() const { return m_needHeavy; } void needHeavy(bool flag) { m_needHeavy = flag; } bool needTraceDumper() const { return m_needTraceDumper; }