I noticed that with GCC 4.8 I get this warning:
src/sigsegv.c: In function ‘signal_segv’:
src/sigsegv.c:75:3: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘greg_t’ [-Wformat=]
sigsegv_outp("reg[%02d] = 0x" REGFORMAT, i, ucontext->uc_mcontext.gregs[i]);
Looking at the code, it has compile-time detection for IA64 and x86, but not x86_64. For the specific code in question, a simpler approach is probably to just use %0*jx as the format, compute the width from sizeof, and cast the register value to intmax_t to match the j width specifier.