summaryrefslogtreecommitdiff
path: root/rts/RetainerProfile.c
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-09-03 16:58:47 +0000
committerIan Lynagh <igloo@earth.li>2007-09-03 16:58:47 +0000
commit45202530612593a0ba7a6c559a38dc1ff26670a4 (patch)
tree228fa373ca3caae3b30b841bc88fbc610badb4bf /rts/RetainerProfile.c
parentf71b024714320a3f1606b3fda36610ac3f043774 (diff)
downloadhaskell-45202530612593a0ba7a6c559a38dc1ff26670a4.tar.gz
Fix building RTS with gcc 2.*; declare all variables at the top of a block
Patch from Audrey Tang.
Diffstat (limited to 'rts/RetainerProfile.c')
-rw-r--r--rts/RetainerProfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index f75250659c..036eacf08b 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -864,6 +864,7 @@ pop( StgClosure **c, StgClosure **cp, retainer *r )
// we divide the step counter: the 2 low bits indicate
// which field, and the rest of the bits indicate the
// entry number (starting from zero).
+ TRecEntry *entry;
nat entry_no = se->info.next.step >> 2;
nat field_no = se->info.next.step & 3;
if (entry_no == ((StgTRecChunk *)se->c)->next_entry_idx) {
@@ -871,7 +872,7 @@ pop( StgClosure **c, StgClosure **cp, retainer *r )
popOff();
return;
}
- TRecEntry *entry = &((StgTRecChunk *)se->c)->entries[entry_no];
+ entry = &((StgTRecChunk *)se->c)->entries[entry_no];
if (field_no == 0) {
*c = (StgClosure *)entry->tvar;
} else if (field_no == 1) {