Fix GCC noreturn compile error, bug1209.
This commit is contained in:
parent
8c9ca7a1b3
commit
77804b4d38
2
Changes
2
Changes
|
|
@ -10,6 +10,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||||
|
|
||||||
**** Fix enum ranges without colons, bug1204. [Mike Popoloski]
|
**** Fix enum ranges without colons, bug1204. [Mike Popoloski]
|
||||||
|
|
||||||
|
**** Fix GCC noreturn compile error, bug1209. [Mike Popoloski]
|
||||||
|
|
||||||
|
|
||||||
* Verilator 3.910 2017-09-07
|
* Verilator 3.910 2017-09-07
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@
|
||||||
# define VL_FUNC __func__
|
# define VL_FUNC __func__
|
||||||
# define VL_LIKELY(x) __builtin_expect(!!(x), 1)
|
# define VL_LIKELY(x) __builtin_expect(!!(x), 1)
|
||||||
# define VL_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
# define VL_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
||||||
|
# define VL_UNREACHABLE __builtin_unreachable();
|
||||||
# define VL_PREFETCH_RD(p) __builtin_prefetch((p),0)
|
# define VL_PREFETCH_RD(p) __builtin_prefetch((p),0)
|
||||||
# define VL_PREFETCH_RW(p) __builtin_prefetch((p),1)
|
# define VL_PREFETCH_RW(p) __builtin_prefetch((p),1)
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
|
|
@ -57,6 +58,7 @@
|
||||||
# define VL_FUNC __FUNCTION__
|
# define VL_FUNC __FUNCTION__
|
||||||
# define VL_LIKELY(x) (!!(x))
|
# define VL_LIKELY(x) (!!(x))
|
||||||
# define VL_UNLIKELY(x) (!!(x))
|
# define VL_UNLIKELY(x) (!!(x))
|
||||||
|
# define VL_UNREACHABLE
|
||||||
# define VL_PREFETCH_RD(p)
|
# define VL_PREFETCH_RD(p)
|
||||||
# define VL_PREFETCH_RW(p)
|
# define VL_PREFETCH_RW(p)
|
||||||
#else
|
#else
|
||||||
|
|
@ -68,6 +70,7 @@
|
||||||
# define VL_FUNC "__func__" ///< Name of current function for error macros
|
# define VL_FUNC "__func__" ///< Name of current function for error macros
|
||||||
# define VL_LIKELY(x) (!!(x)) ///< Boolean expression more often true than false
|
# define VL_LIKELY(x) (!!(x)) ///< Boolean expression more often true than false
|
||||||
# define VL_UNLIKELY(x) (!!(x)) ///< Boolean expression more often false than true
|
# define VL_UNLIKELY(x) (!!(x)) ///< Boolean expression more often false than true
|
||||||
|
# define VL_UNREACHABLE ///< Point that may never be reached
|
||||||
# define VL_PREFETCH_RD(p) ///< Prefetch data with read intent
|
# define VL_PREFETCH_RD(p) ///< Prefetch data with read intent
|
||||||
# define VL_PREFETCH_RW(p) ///< Prefetch data with read/write intent
|
# define VL_PREFETCH_RW(p) ///< Prefetch data with read/write intent
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -254,8 +254,7 @@ class V3Error {
|
||||||
// Global versions, so that if the class doesn't define a operator, we get the functions anyways.
|
// Global versions, so that if the class doesn't define a operator, we get the functions anyways.
|
||||||
inline int debug() { return V3Error::debugDefault(); }
|
inline int debug() { return V3Error::debugDefault(); }
|
||||||
inline void v3errorEnd(ostringstream& sstr) { V3Error::v3errorEnd(sstr); }
|
inline void v3errorEnd(ostringstream& sstr) { V3Error::v3errorEnd(sstr); }
|
||||||
inline void v3errorEndFatal(ostringstream& sstr) VL_ATTR_NORETURN;
|
inline void v3errorEndFatal(ostringstream& sstr) { V3Error::v3errorEnd(sstr); assert(0); VL_UNREACHABLE }
|
||||||
inline void v3errorEndFatal(ostringstream& sstr) { V3Error::v3errorEnd(sstr); assert(0); }
|
|
||||||
|
|
||||||
// Theses allow errors using << operators: v3error("foo"<<"bar");
|
// Theses allow errors using << operators: v3error("foo"<<"bar");
|
||||||
// Careful, you can't put () around msg, as you would in most macro definitions
|
// Careful, you can't put () around msg, as you would in most macro definitions
|
||||||
|
|
|
||||||
|
|
@ -161,11 +161,13 @@ public:
|
||||||
|
|
||||||
// OPERATORS
|
// OPERATORS
|
||||||
void v3errorEnd(ostringstream& str);
|
void v3errorEnd(ostringstream& str);
|
||||||
void v3errorEndFatal(ostringstream& str) VL_ATTR_NORETURN;
|
void v3errorEndFatal(ostringstream& str);
|
||||||
string warnMore() const;
|
string warnMore() const;
|
||||||
inline bool operator==(FileLine rhs) const {
|
inline bool operator==(FileLine rhs) const {
|
||||||
return (m_lineno==rhs.m_lineno && m_filenameno==rhs.m_filenameno && m_warnOn==rhs.m_warnOn);
|
return (m_lineno==rhs.m_lineno && m_filenameno==rhs.m_filenameno && m_warnOn==rhs.m_warnOn);
|
||||||
}
|
}
|
||||||
|
private:
|
||||||
|
void v3errorEndFatalGuts(ostringstream& str);
|
||||||
};
|
};
|
||||||
ostream& operator<<(ostream& os, FileLine* fileline);
|
ostream& operator<<(ostream& os, FileLine* fileline);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue