#include static void __attribute__((__noinline__)) hexdump(const char *name, const volatile void *buf, size_t len) { const volatile unsigned char *p = buf; size_t n = len; fprintf(stderr, "name@%p, buf@%p, len=%zu\n", name, buf, len); printf("%s: ", name); while (n --> 0) printf("%0hhx", *p++); printf("\n"); } int main(void) { volatile int c = '2'; volatile int di = c - '0'; hexdump("di", &di, sizeof di); //volatile long double dld = di; //hexdump("dld", &dld, sizeof dld); //volatile double dd = di; //hexdump("dd", &dd, sizeof dd); //volatile long double ddld = dd; //hexdump("ddld", &ddld, sizeof ddld); //printf("i=%d dld=%.17Lg=%La dd=%.17g=%a ddld=%.17Lg=%La\n", di, dld, dld, dd, dd, ddld, ddld); return 0; }