diff --git a/src/V3Ast.h b/src/V3Ast.h index 2f6df4bd9..c2f5ca1a9 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -84,7 +84,7 @@ public: inline AstType(en _e) : m_e{_e} {} explicit inline AstType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } }; inline bool operator==(const AstType& lhs, const AstType& rhs) { return lhs.m_e == rhs.m_e; } @@ -108,7 +108,7 @@ public: inline VLifetime(en _e) : m_e{_e} {} explicit inline VLifetime(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } bool isNone() const { return m_e == NONE; } bool isAutomatic() const { return m_e == AUTOMATIC; } @@ -145,7 +145,7 @@ public: return isSigned ? VSigning(SIGNED) : VSigning(UNSIGNED); } explicit inline VSigning(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } inline bool isSigned() const { return m_e == SIGNED; } inline bool isNosign() const { return m_e == NOSIGN; } @@ -182,7 +182,7 @@ public: inline AstPragmaType(en _e) : m_e{_e} {} explicit inline AstPragmaType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } }; inline bool operator==(const AstPragmaType& lhs, const AstPragmaType& rhs) { @@ -213,7 +213,7 @@ public: inline AstCFuncType(en _e) : m_e{_e} {} explicit inline AstCFuncType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } // METHODS bool isTrace() const { return m_e != FT_NORMAL; } @@ -303,7 +303,7 @@ public: inline VEdgeType(en _e) : m_e{_e} {} explicit inline VEdgeType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } }; inline bool operator==(const VEdgeType& lhs, const VEdgeType& rhs) { return lhs.m_e == rhs.m_e; } @@ -383,7 +383,7 @@ public: inline AstAttrType(en _e) : m_e{_e} {} explicit inline AstAttrType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } }; inline bool operator==(const AstAttrType& lhs, const AstAttrType& rhs) { @@ -453,7 +453,7 @@ public: inline AstBasicDTypeKwd(en _e) : m_e{_e} {} explicit inline AstBasicDTypeKwd(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } int width() const { switch (m_e) { @@ -540,7 +540,7 @@ public: inline VDirection(en _e) : m_e{_e} {} explicit inline VDirection(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } const char* ascii() const { static const char* const names[] = {"NONE", "INPUT", "OUTPUT", "INOUT", "REF", "CONSTREF"}; @@ -586,7 +586,7 @@ public: inline VBoolOrUnknown(en _e) : m_e{_e} {} explicit inline VBoolOrUnknown(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning const char* ascii() const { static const char* const names[] = {"FALSE", "TRUE", "UNK"}; return names[m_e]; @@ -625,7 +625,7 @@ public: inline VJoinType(en _e) : m_e{_e} {} explicit inline VJoinType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning const char* ascii() const { static const char* const names[] = {"JOIN", "JOIN_ANY", "JOIN_NONE"}; return names[m_e]; @@ -678,7 +678,7 @@ public: inline AstVarType(en _e) : m_e{_e} {} explicit inline AstVarType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } const char* ascii() const { static const char* const names[] = { @@ -726,7 +726,7 @@ public: inline VBranchPred(en _e) : m_e{_e} {} explicit inline VBranchPred(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } bool unknown() const { return m_e == BP_UNKNOWN; } bool likely() const { return m_e == BP_LIKELY; } @@ -767,7 +767,7 @@ public: inline VVarAttrClocker(en _e) : m_e{_e} {} explicit inline VVarAttrClocker(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } bool unknown() const { return m_e == CLOCKER_UNKNOWN; } VVarAttrClocker invert() const { @@ -809,7 +809,7 @@ public: inline VAlwaysKwd(en _e) : m_e{_e} {} explicit inline VAlwaysKwd(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } const char* ascii() const { static const char* const names[] = {"always", "always_ff", "always_latch", "always_comb"}; @@ -832,7 +832,7 @@ public: inline VCaseType(en _e) : m_e{_e} {} explicit inline VCaseType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } }; inline bool operator==(const VCaseType& lhs, const VCaseType& rhs) { return lhs.m_e == rhs.m_e; } @@ -851,7 +851,7 @@ public: inline AstDisplayType(en _e) : m_e{_e} {} explicit inline AstDisplayType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } bool addNewline() const { return m_e != DT_WRITE; } bool needScopeTracking() const { return m_e != DT_DISPLAY && m_e != DT_WRITE; } @@ -883,7 +883,7 @@ public: inline VDumpCtlType(en _e) : m_e{_e} {} explicit inline VDumpCtlType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } const char* ascii() const { static const char* const names[] = {"$dumpfile", "$dumpvars", "$dumpall", "$dumpflush", @@ -913,7 +913,7 @@ public: inline VParseRefExp(en _e) : m_e{_e} {} explicit inline VParseRefExp(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } const char* ascii() const { static const char* const names[] = {"", "$root", "TEXT", "PREDOT"}; @@ -1027,7 +1027,7 @@ public: inline VUseType(en _e) : m_e{_e} {} explicit inline VUseType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning bool isInclude() const { return m_e == IMP_INCLUDE || m_e == INT_INCLUDE; } bool isFwdClass() const { return m_e == IMP_FWD_CLASS || m_e == INT_FWD_CLASS; } operator en() const { return m_e; } diff --git a/src/V3Error.cpp b/src/V3Error.cpp index ace1450a2..e60ce5667 100644 --- a/src/V3Error.cpp +++ b/src/V3Error.cpp @@ -174,12 +174,10 @@ void V3Error::vlAbort() { // Global Functions void V3Error::suppressThisWarning() { - if (s_errorCode >= V3ErrorCode::EC_MIN) { #ifndef _V3ERROR_NO_GLOBAL_ - V3Stats::addStatSum(string("Warnings, Suppressed ") + s_errorCode.ascii(), 1); + V3Stats::addStatSum(string("Warnings, Suppressed ") + s_errorCode.ascii(), 1); #endif - s_errorSuppressed = true; - } + s_errorSuppressed = true; } string V3Error::warnMore() { return string(msgPrefix().size(), ' '); } diff --git a/src/V3Error.h b/src/V3Error.h index 23d411055..8555e8b9b 100644 --- a/src/V3Error.h +++ b/src/V3Error.h @@ -135,7 +135,7 @@ public: : m_e{_e} {} explicit V3ErrorCode(const char* msgp); // Matching code or ERROR explicit inline V3ErrorCode(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } const char* ascii() const { // clang-format off diff --git a/src/V3Global.h b/src/V3Global.h index 605fb83a8..2321fb21b 100644 --- a/src/V3Global.h +++ b/src/V3Global.h @@ -51,7 +51,7 @@ public: inline VWidthMinUsage(en _e) : m_e{_e} {} explicit inline VWidthMinUsage(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } }; inline bool operator==(const VWidthMinUsage& lhs, const VWidthMinUsage& rhs) { diff --git a/src/V3Graph.h b/src/V3Graph.h index 9fe5179e3..c8d0b2431 100644 --- a/src/V3Graph.h +++ b/src/V3Graph.h @@ -60,7 +60,7 @@ public: inline GraphWay(en _e) : m_e{_e} {} explicit inline GraphWay(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } const char* ascii() const { static const char* const names[] = {"FORWARD", "REVERSE"}; diff --git a/src/V3LangCode.h b/src/V3LangCode.h index 19c0ba6ef..e9eb7ae4e 100644 --- a/src/V3LangCode.h +++ b/src/V3LangCode.h @@ -62,7 +62,7 @@ public: : m_e{_e} {} explicit V3LangCode(const char* textp); explicit inline V3LangCode(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } }; diff --git a/src/V3Options.h b/src/V3Options.h index 08710205e..1f6cb9ea5 100644 --- a/src/V3Options.h +++ b/src/V3Options.h @@ -45,7 +45,7 @@ public: inline VOptionBool(en _e) : m_e{_e} {} explicit inline VOptionBool(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } bool isDefault() const { return m_e == OPT_DEFAULT_FALSE || m_e == OPT_DEFAULT_TRUE; } bool isTrue() const { return m_e == OPT_TRUE || m_e == OPT_DEFAULT_TRUE; } @@ -92,7 +92,7 @@ public: inline VTimescale(en _e) : m_e{_e} {} explicit inline VTimescale(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning // Construct from string VTimescale(const string& value, bool& badr); VTimescale(double value, bool& badr) { @@ -174,7 +174,7 @@ public: inline TraceFormat(en _e = VCD) : m_e{_e} {} explicit inline TraceFormat(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } bool fst() const { return m_e == FST; } string classBase() const { diff --git a/src/V3OrderGraph.h b/src/V3OrderGraph.h index 5cb94bbca..a0cc562ef 100644 --- a/src/V3OrderGraph.h +++ b/src/V3OrderGraph.h @@ -94,7 +94,7 @@ struct OrderVEdgeType { inline OrderVEdgeType(en _e) : m_e{_e} {} explicit inline OrderVEdgeType(int _e) - : m_e{static_cast(_e)} {} + : m_e(static_cast(_e)) {} // Need () or GCC 4.8 false warning operator en() const { return m_e; } }; inline bool operator==(const OrderVEdgeType& lhs, const OrderVEdgeType& rhs) {