Hello Marc, > I am wondering how to print (using printf) values of type idx_t > reliably without assuming that idx_t == ptrdiff_t and without > conversion to uintptr_t. > > Would it make sense to add PRIxxx and SCNxxx macros (as those found in > inttypes.h) to idx.h?
You can certainly add such macros. But given that internationalization supports PRIuPTR but not your PRIxxx macro (both at runtime in glibc and GNU libintl, as well as in the 'msgfmt -c' tooling), I would recommend to stay with the predefined PRI* macros. Bruno