From 31f6b60f650a72d7727d386cef160f4baae70f38 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 11 Dec 2025 17:57:07 +0100 Subject: _Alignof and stuff --- test/13-c11.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/13-c11.c (limited to 'test/13-c11.c') diff --git a/test/13-c11.c b/test/13-c11.c new file mode 100644 index 0000000..479c2d7 --- /dev/null +++ b/test/13-c11.c @@ -0,0 +1,22 @@ +/* CFLAGS: -std=c11 -Werror */ +/* EXPECT: +*/ + +#include +#include +#include + +noreturn void quit(int x) { + exit(x); +} + +int foo(int x) { + if (x < 0) quit(alignof(int *)); + else return x; +} + +struct x{int h:2;} X; +int main(int argc, char **argv) { + return foo(0); +} + -- cgit v1.2.3