From: simonmar Date: Mon, 9 Jan 2006 14:35:31 +0000 (+0000) Subject: [project @ 2006-01-09 14:35:31 by simonmar] X-Git-Tag: final_switch_to_darcs,_this_repo_is_now_live~49 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=fff682f4cd3e29aa423720512977d63e2a4e3bc4 [project @ 2006-01-09 14:35:31 by simonmar] Avoid "dereferencing type-punned pointer will break strict-aliasing rules" warnings --- diff --git a/ghc/rts/GCCompact.c b/ghc/rts/GCCompact.c index e53429c..58753fe 100644 --- a/ghc/rts/GCCompact.c +++ b/ghc/rts/GCCompact.c @@ -929,10 +929,10 @@ compact( void (*get_roots)(evac_fn) ) // the weak pointer lists... if (weak_ptr_list != NULL) { - thread((StgPtr)&weak_ptr_list); + thread((StgPtr)(void *)&weak_ptr_list); } if (old_weak_ptr_list != NULL) { - thread((StgPtr)&old_weak_ptr_list); // tmp + thread((StgPtr)(void *)&old_weak_ptr_list); // tmp } // mutable lists @@ -947,10 +947,10 @@ compact( void (*get_roots)(evac_fn) ) } // the global thread list - thread((StgPtr)&all_threads); + thread((StgPtr)(void *)&all_threads); // any threads resurrected during this GC - thread((StgPtr)&resurrected_threads); + thread((StgPtr)(void *)&resurrected_threads); // the task list {