From 09a245679c8d01eaec71b22985a9895667280cad Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 1 Sep 2025 23:44:51 +0900 Subject: feat: partially support anonymous structs/unions/enums --- tests/117.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/117.sh (limited to 'tests/117.sh') diff --git a/tests/117.sh b/tests/117.sh new file mode 100644 index 0000000..765dc58 --- /dev/null +++ b/tests/117.sh @@ -0,0 +1,31 @@ +cat <<'EOF' > expected +8 +4 +4 +EOF + +test_diff <<'EOF' +int printf(); + +typedef struct { + int x; + int y; +} S; + +typedef union { + int a; + char b; +} U; + +typedef enum { + RED, + GREEN, + BLUE +} E; + +int main() { + printf("%zu\n", sizeof(S)); + printf("%zu\n", sizeof(U)); + printf("%zu\n", sizeof(E)); +} +EOF -- cgit v1.2.3-70-g09d2