From 67c96568772bc0686e9a73e1d6490d9d982b53dd Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Wed, 24 Apr 2019 19:28:07 -0700 Subject: Implement _Generic selection --- test/generic.c | 6 ++++++ test/generic.qbe | 1 + 2 files changed, 7 insertions(+) create mode 100644 test/generic.c create mode 100644 test/generic.qbe (limited to 'test') diff --git a/test/generic.c b/test/generic.c new file mode 100644 index 0000000..d04bc90 --- /dev/null +++ b/test/generic.c @@ -0,0 +1,6 @@ +int x = _Generic(123, + const int: 1, + unsigned: 2, + int: 3, + int *: 4 +); diff --git a/test/generic.qbe b/test/generic.qbe new file mode 100644 index 0000000..6b57b3e --- /dev/null +++ b/test/generic.qbe @@ -0,0 +1 @@ +export data $x = align 4 { w 3, } -- cgit v1.2.3