Duncan Coutts pushed to branch wip/dcoutts/printf-warnings at Glasgow Haskell Compiler / GHC
Commits:
-
42c40d8c
by Duncan Coutts at 2026-09-01T11:05:14+01:00
4 changed files:
Changes:
| ... | ... | @@ -554,7 +554,7 @@ printSmallBitmap( StgPtr spBottom, StgPtr payload, StgWord bitmap, |
| 554 | 554 | uint32_t i;
|
| 555 | 555 | |
| 556 | 556 | for(i = 0; i < size; i++, bitmap >>= 1 ) {
|
| 557 | - debugBelch(" stk[%ld] (%p) = ", (long)(spBottom-(payload+i)), payload+i);
|
|
| 557 | + debugBelch(" stk[%td] (%p) = ", spBottom-(payload+i), payload+i);
|
|
| 558 | 558 | if ((bitmap & 1) == 0) {
|
| 559 | 559 | printPtr((P_)payload[i]);
|
| 560 | 560 | debugBelch(" -- ");
|
| ... | ... | @@ -577,7 +577,7 @@ printLargeBitmap( StgPtr spBottom, StgPtr payload, StgLargeBitmap* large_bitmap, |
| 577 | 577 | StgWord bitmap = large_bitmap->bitmap[bmp];
|
| 578 | 578 | j = 0;
|
| 579 | 579 | for(; i < size && j < BITS_IN(W_); j++, i++, bitmap >>= 1 ) {
|
| 580 | - debugBelch(" stk[%" FMT_Word "] (%p) = ", (W_)(spBottom-(payload+i)), payload+i);
|
|
| 580 | + debugBelch(" stk[%td] (%p) = ", spBottom-(payload+i), payload+i);
|
|
| 581 | 581 | if ((bitmap & 1) == 0) {
|
| 582 | 582 | printPtr((P_)payload[i]);
|
| 583 | 583 | debugBelch(" -- ");
|
| ... | ... | @@ -134,7 +134,8 @@ static int shake(void) { |
| 134 | 134 | StgTRecHeader *__t = (_t); \
|
| 135 | 135 | StgTRecChunk *__c = __t -> current_chunk; \
|
| 136 | 136 | StgWord __limit = __c -> next_entry_idx; \
|
| 137 | - TRACE("%p : FOR_EACH_ENTRY, current_chunk=%p limit=%ld", __t, __c, __limit); \
|
|
| 137 | + TRACE("%p : FOR_EACH_ENTRY, current_chunk=%p limit=%" FMT_Word, \
|
|
| 138 | + __t, __c, __limit); \
|
|
| 138 | 139 | while (__c != END_STM_CHUNK_LIST) { \
|
| 139 | 140 | StgWord __i; \
|
| 140 | 141 | for (__i = 0; __i < __limit; __i ++) { \
|
| ... | ... | @@ -195,7 +195,7 @@ lookupStableName (StgPtr p) |
| 195 | 195 | |
| 196 | 196 | if (sn != 0) {
|
| 197 | 197 | ASSERT(stable_name_table[sn].addr == p);
|
| 198 | - debugTrace(DEBUG_stable, "cached stable name %ld at %p",sn,p);
|
|
| 198 | + debugTrace(DEBUG_stable, "cached stable name %" FMT_Word " at %p", sn, p);
|
|
| 199 | 199 | stableNameUnlock();
|
| 200 | 200 | return sn;
|
| 201 | 201 | }
|
| ... | ... | @@ -275,8 +275,8 @@ gcStableNameTable( void ) |
| 275 | 275 | p->sn_obj = isAlive(p->sn_obj);
|
| 276 | 276 | if (p->sn_obj == NULL) {
|
| 277 | 277 | // StableName object died
|
| 278 | - debugTrace(DEBUG_stable, "GC'd StableName %ld (addr=%p)",
|
|
| 279 | - (long)(p - stable_name_table), p->addr);
|
|
| 278 | + debugTrace(DEBUG_stable, "GC'd StableName %td (addr=%p)",
|
|
| 279 | + p - stable_name_table, p->addr);
|
|
| 280 | 280 | freeSnEntry(p);
|
| 281 | 281 | } else if (p->addr != NULL) {
|
| 282 | 282 | // sn_obj is alive, update pointee
|
| ... | ... | @@ -315,8 +315,8 @@ threadPaused(Capability *cap, StgTSO *tso) |
| 315 | 315 | || (bh_info == &stg_WHITEHOLE_info))
|
| 316 | 316 | {
|
| 317 | 317 | debugTrace(DEBUG_squeeze,
|
| 318 | - "suspending duplicate work: %ld words of stack",
|
|
| 319 | - (long)((StgPtr)frame - tso->stackobj->sp));
|
|
| 318 | + "suspending duplicate work: %td words of stack",
|
|
| 319 | + (StgPtr)frame - tso->stackobj->sp);
|
|
| 320 | 320 | |
| 321 | 321 | // If this closure is already an indirection, then
|
| 322 | 322 | // suspend the computation up to this point.
|