From: Andreas Sandberg Date: Mon, 7 Jan 2013 18:05:38 +0000 (-0500) Subject: arch: Fix broken M5VarArgsFault initialization X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3551e82f7087a0c0398ef037c979e0cc24d51ca;p=gem5.git arch: Fix broken M5VarArgsFault initialization At least gcc 4.4.3 seems to get confused by the use of func both as a template parameter and a member variable in the M5VarArgsFault class. This causes the value of the member variable func to be unpredictable in M5VarArgsFault objects. This changeset renames the template parameter to remove this ambiguity. --- diff --git a/src/arch/generic/debugfaults.hh b/src/arch/generic/debugfaults.hh index 2a10ced92..c42f87c25 100644 --- a/src/arch/generic/debugfaults.hh +++ b/src/arch/generic/debugfaults.hh @@ -108,12 +108,12 @@ class M5DebugFault : public FaultBase } }; -template +template class M5VarArgsFault : public M5DebugFault { public: M5VarArgsFault(const std::string &format, CPRINTF_DECLARATION) : - M5DebugFault((DebugFunc)func, csprintf(format, VARARGS_ALLARGS)) + M5DebugFault((DebugFunc)Func, csprintf(format, VARARGS_ALLARGS)) {} };