From: panne Date: Fri, 7 May 2004 21:19:21 +0000 (+0000) Subject: [project @ 2004-05-07 21:19:21 by panne] X-Git-Tag: Initial_conversion_from_CVS_complete~1852 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=70b3bd34ceead69761c7ec26e76feb2037c0bac5;p=ghc-hetmet.git [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... --- 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;