summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/usr.bin/xlint/lint1/d_nested_structs.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/netbsd-tests/usr.bin/xlint/lint1/d_nested_structs.c')
-rw-r--r--contrib/netbsd-tests/usr.bin/xlint/lint1/d_nested_structs.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/usr.bin/xlint/lint1/d_nested_structs.c b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_nested_structs.c
new file mode 100644
index 0000000..edd3396
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_nested_structs.c
@@ -0,0 +1,21 @@
+/* Nested struct */
+typedef void *EditLine;
+typedef void *History;
+
+typedef struct {
+ EditLine *el;
+ History *hist;
+} el_mode_t;
+
+struct el_modes_s {
+ el_mode_t command;
+ el_mode_t string;
+ el_mode_t filec;
+ el_mode_t mime_enc;
+};
+
+struct el_modes_s elm = {
+ .command = { .el = 0, .hist = 0, },
+ .string = { .el = 0, .hist = 0, },
+ .filec = { .el = 0, .hist = 0, },
+};
OpenPOWER on IntegriCloud