Small fixes to appease recent clang versions.
result = fp32_infinity(sgn);
flags |= FPLIB_DZC;
} else if (!((uint32_t)(op << 1) >> 22)) {
- bool overflow_to_inf;
+ bool overflow_to_inf = false;
switch (FPCRRounding(fpscr)) {
case FPRounding_TIEEVEN:
overflow_to_inf = true;
result = fp64_infinity(sgn);
flags |= FPLIB_DZC;
} else if (!((uint64_t)(op << 1) >> 51)) {
- bool overflow_to_inf;
+ bool overflow_to_inf = false;
switch (FPCRRounding(fpscr)) {
case FPRounding_TIEEVEN:
overflow_to_inf = true;
#define M5_PRAGMA_NORETURN(x)
#define M5_DUMMY_RETURN
#define M5_VAR_USED __attribute__((unused))
+
+#if defined(__clang__)
+#define M5_CLASS_VAR_USED M5_VAR_USED
+#else
+#define M5_CLASS_VAR_USED
+#endif
+
#define M5_ATTR_PACKED __attribute__ ((__packed__))
#define M5_NO_INLINE __attribute__ ((__noinline__))
#else
* the misc registers that come after the physical registers and
* which are hardwired to be always considered ready.
*/
- unsigned numTotalRegs;
+ unsigned M5_CLASS_VAR_USED numTotalRegs;
/** The index of the zero register. */
PhysRegIndex zeroRegIdx;
{
private:
/** Required for sensible debug messages.*/
- const SimObject *object;
+ const M5_CLASS_VAR_USED SimObject *object;
/** Vector for name look-up. */
std::vector<ProbePoint *> points;