1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <stdint.h> #include <stdio.h> union [[gnu::transparent_union]] un { void *ptr; intptr_t i; }; void pasi(union un v) { printf("%p\n", v.ptr); } int main(int argc, char *argv[]) { pasi((intptr_t)0x42); pasi((void *)&pasi); }