From d821a394a8765a2175be9d6cc8eae29193496a14 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 13 Nov 2002 21:53:13 +0000 Subject: [PATCH] more tests --- regress/usr.bin/xlint/lint1/test12.c | 8 ++++++++ regress/usr.bin/xlint/lint1/test13.c | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 regress/usr.bin/xlint/lint1/test12.c create mode 100644 regress/usr.bin/xlint/lint1/test13.c diff --git a/regress/usr.bin/xlint/lint1/test12.c b/regress/usr.bin/xlint/lint1/test12.c new file mode 100644 index 000000000000..51d34d450f21 --- /dev/null +++ b/regress/usr.bin/xlint/lint1/test12.c @@ -0,0 +1,8 @@ +/* C99 union initialization */ +union { + int i[10]; + short s; +} c[] = { + { s: 2 }, + { i: { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } }, +}; diff --git a/regress/usr.bin/xlint/lint1/test13.c b/regress/usr.bin/xlint/lint1/test13.c new file mode 100644 index 000000000000..f5e8b59f4621 --- /dev/null +++ b/regress/usr.bin/xlint/lint1/test13.c @@ -0,0 +1,8 @@ +/* C99 union initialization */ +struct { + int i[10]; + char *s; +} c[] = { + { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, + "foo" }, +};