From c3551e82f7087a0c0398ef037c979e0cc24d51ca Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 13:05:38 -0500 Subject: [PATCH] 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. --- src/arch/generic/debugfaults.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) {} }; -- 2.30.2