From 70b3bd34ceead69761c7ec26e76feb2037c0bac5 Mon Sep 17 00:00:00 2001 From: panne Date: Fri, 7 May 2004 21:19:21 +0000 Subject: [PATCH] [project @ 2004-05-07 21:19:21 by panne] GCC's __attribute__ handling seems to be a little bit stricter with GCC 3.3.3: * When a function declaration uses it, the corresponding definition has to use it, too. * Syntactically it is allowed only at the beginning of the function definition. Let's hope that the current syntax is backwards compatible... --- ghc/rts/GC.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 6fa5416..210f15c 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.164 2003/11/26 12:14:26 simonmar Exp $ + * $Id: GC.c,v 1.165 2004/05/07 21:19:21 panne Exp $ * * (c) The GHC Team 1998-2003 * @@ -142,11 +142,13 @@ static void mark_root ( StgClosure **root ); // Use a register argument for evacuate, if available. #if __GNUC__ >= 2 -static StgClosure * evacuate (StgClosure *q) __attribute__((regparm(1))); +#define REGPARM1 __attribute__((regparm(1))) #else -static StgClosure * evacuate (StgClosure *q); +#define REGPARM1 #endif +REGPARM1 static StgClosure * evacuate (StgClosure *q); + static void zero_static_object_list ( StgClosure* first_static ); static void zero_mutable_list ( StgMutClosure *first ); @@ -1659,7 +1661,7 @@ mkMutCons(StgClosure *ptr, generation *gen) extra reads/writes than we save. -------------------------------------------------------------------------- */ -static StgClosure * +REGPARM1 static StgClosure * evacuate(StgClosure *q) { StgClosure *to; -- 1.7.10.4