From dc6912769121c335c6b09a6c002a4a8e0528703a Mon Sep 17 00:00:00 2001 From: Xavier ASUS Date: Mon, 28 Oct 2019 15:53:52 +0100 Subject: First commit --- src/main.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main.c (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..03e5944 --- /dev/null +++ b/src/main.c @@ -0,0 +1,30 @@ +#include "bar.h" + +struct example +{ + int a; + char b; + int *c; +}; + +static void foo(struct example *const st) +{ + if (st) + { + if (st->c) + { + (*st->c)++; + } + } +} + +_Noreturn void main(void) +{ + static struct example st; + + foo(&st); + + bar(st.a); + + for (;;); +} -- cgit v1.2.3