Skip to content

Commit 548008f

Browse files
committed
Try the test foo program that works on Godbolt
1 parent bda9589 commit 548008f

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/nob.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
# https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut
4747
run: |
4848
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
49-
cl.exe /Fe:nob nob.c
50-
nob.exe
49+
cl.exe /Fe:foo foo.c
50+
foo.exe
5151
- name: Build how_to-s
5252
shell: cmd
5353
run: |

foo.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <stdio.h>
2+
3+
typedef struct Arguments {
4+
int* arg;
5+
6+
int thing;
7+
} Arguments;
8+
9+
void func_(int benis, Arguments args)
10+
{
11+
printf(".arg = %p\n", args.arg);
12+
printf(".thing = %d\n", args.thing);
13+
}
14+
15+
#define func__(benis, ...) func_( (benis), (Arguments){0, __VA_ARGS__})
16+
17+
int main() {
18+
func__(123, .thing = 69);
19+
}

0 commit comments

Comments
 (0)