diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-04 15:23:59 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-04 15:23:59 -0500 |
| commit | 98f0c51119f9d42d733f44cb516b1c2bcd9061af (patch) | |
| tree | 39ab4fa635f858b76b9a8bbf84701c2788d5f498 /foo.c | |
Initial commit
Diffstat (limited to 'foo.c')
| -rw-r--r-- | foo.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -0,0 +1,12 @@ +#include <stdio.h> + +int main(void) { + int x = 23; + const char *s = "Hi"; +#define say(x) _Generic(x, int: printf("%d\n", x), char *: puts(s), default: puts("???")) + say(x); + say(s); +#define all(...) { __VA_ARGS__; } + all(say("one"); say(2)) + return 0; +} |
