diff options
| author | Karel Kočí <cynerd@email.cz> | 2025-10-04 12:47:24 +0200 |
|---|---|---|
| committer | Karel Kočí <cynerd@email.cz> | 2025-10-04 12:54:27 +0200 |
| commit | 24e314ca2b56f059f8af28a20b0d2215dbe33eaa (patch) | |
| tree | 12ed017ad24159eb99d2c4b8a50cf5d58af1a0ad /2025-linuxdays/transunion.c | |
| parent | 58293a7863b4fc2f920bc03008f12f4f6e7ffcc8 (diff) | |
| download | presentations-24e314ca2b56f059f8af28a20b0d2215dbe33eaa.tar.gz presentations-24e314ca2b56f059f8af28a20b0d2215dbe33eaa.tar.bz2 presentations-24e314ca2b56f059f8af28a20b0d2215dbe33eaa.zip | |
Diffstat (limited to '2025-linuxdays/transunion.c')
| -rw-r--r-- | 2025-linuxdays/transunion.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/2025-linuxdays/transunion.c b/2025-linuxdays/transunion.c new file mode 100644 index 0000000..cde6059 --- /dev/null +++ b/2025-linuxdays/transunion.c @@ -0,0 +1,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); +} |
