[Git][ghc/ghc][wip/9.14.2-backports] rts: fix -Wcompare-distinct-pointer-types errors
Zubin pushed to branch wip/9.14.2-backports at Glasgow Haskell Compiler / GHC Commits: 7ea1e2a4 by Cheng Shao at 2026-06-10T21:19:26+05:30 rts: fix -Wcompare-distinct-pointer-types errors This commit fixes `-Wcompare-distinct-pointer-types` errors in the RTS which should have been caught by the `validate` flavour but was warnings in CI due to the recent `+werror` regression. (cherry picked from commit de54e264c3c87c21e4243c2e9a402923ec7d9d6e) - - - - - 1 changed file: - rts/Interpreter.c Changes: ===================================== rts/Interpreter.c ===================================== @@ -672,7 +672,7 @@ slow_spw(void *Sp, StgStack *cur_stack, StgWord offset_words){ } // 2b. Access the element if there is no underflow frame, it must be right // at the top of the stack. - else if(Sp_plusW(offset_words) < (StgPtr)(cur_stack->stack + cur_stack->stack_size)) { + else if(Sp_plusW(offset_words) < (void*)(cur_stack->stack + cur_stack->stack_size)) { // Still inside the stack chunk return Sp_plusW(offset_words); } else { @@ -2468,7 +2468,7 @@ run_BCO: threadStackUnderflow(cap, cap->r.rCurrentTSO); LOAD_STACK_POINTERS; by -= sp_to_uf; - } else if (Sp_plusW(by) < (StgPtr)(stk->stack + stk->stack_size)) { + } else if (Sp_plusW(by) < (void*)(stk->stack + stk->stack_size)) { // we're within the first stack chunk, this chunk has // no underflow frame break; View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7ea1e2a460cbf9f17d2795824630e819... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7ea1e2a460cbf9f17d2795824630e819... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Zubin (@wz1000)