From efafbbddfb6f48c332299b8451428d2e4c741f2a Mon Sep 17 00:00:00 2001 From: "erg@google.com" Date: Thu, 19 Aug 2010 20:23:25 +0000 Subject: Fix for the new IPC system on gcc 4.5 and greater. We need the new noclone attribute since gcc tries to specialize many of the ::Read() members for the subtypes since they're only invoked from Log(). Reported by some dude named flo on IRC. BUG=none TEST=none Review URL: http://codereview.chromium.org/3133025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56734 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_message_utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ipc/ipc_message_utils.h') diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h index c3a9ca4..75b80ae3 100644 --- a/ipc/ipc_message_utils.h +++ b/ipc/ipc_message_utils.h @@ -25,7 +25,15 @@ // ipc_message_utils_impl.h in those files) and exported, instead of expanded // at every call site. Special note: GCC happily accepts the attribute before // the method declaration, but only acts on it if it is after. +#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40500 +// Starting in gcc 4.5, the noinline no longer implies the concept covered by +// the introduced noclone attribute, which will create specialized versions of +// functions/methods when certain types are constant. +// www.gnu.org/software/gcc/gcc-4.5/changes.html +#define IPC_MSG_NOINLINE __attribute__((noinline, noclone)); +#else #define IPC_MSG_NOINLINE __attribute__((noinline)); +#endif #elif defined(COMPILER_MSVC) // MSVC++ doesn't do this. #define IPC_MSG_NOINLINE -- cgit v1.1