[Gc] Patch for adjusting printf actual param types
Petter Urkedal
urkedal at nbi.dk
Sun Oct 26 02:39:03 PST 2008
On 2008-10-25, Ivan Maidanski wrote:
> This patch adjusts the types of actual parameters for GC_..._printf() according to its format specifiers.
Not to disagree with your patch, but how about imitating the C99
standard and add the following definitions to gc.h (next to the GC_word
typedef)?
#define GC_PRIdWORD "ld"
#define GC_PRIiWORD "li"
#define GC_PRIoWORD "lo"
#define GC_PRIuWORD "ld"
#define GC_PRIxWORD "lx"
#define GC_PRIXWORD "lX"
One of the print statements below would then look like
GC_printf("Free list %lu (total size %"GC_PRIuWORD");\n",
i, GC_free_bytes[i]);
BTW, i is already long above, no cast needed.
More information about the Gc
mailing list