Module Name: src Committed By: christos Date: Tue Jul 28 18:05:19 UTC 2015
Modified Files: src/tests/usr.bin/xlint/lint1: Makefile Added Files: src/tests/usr.bin/xlint/lint1: d_c99_union_init4.c Log Message: new c99 init test found by xorg's Iconify.c To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_c99_union_init4.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/lint1/Makefile diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.8 src/tests/usr.bin/xlint/lint1/Makefile:1.9 --- src/tests/usr.bin/xlint/lint1/Makefile:1.8 Wed Jul 1 11:36:44 2015 +++ src/tests/usr.bin/xlint/lint1/Makefile Tue Jul 28 14:05:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2015/07/01 15:36:44 christos Exp $ +# $NetBSD: Makefile,v 1.9 2015/07/28 18:05:19 christos Exp $ NOMAN= # defined @@ -25,6 +25,7 @@ FILES+= d_c99_nested_struct.c FILES+= d_c99_union_init1.c FILES+= d_c99_union_init2.c FILES+= d_c99_union_init3.c +FILES+= d_c99_union_init4.c FILES+= d_c9x_array_init.c FILES+= d_c9x_recursive_init.c FILES+= d_cast_fun_array_param.c Added files: Index: src/tests/usr.bin/xlint/lint1/d_c99_union_init4.c diff -u /dev/null src/tests/usr.bin/xlint/lint1/d_c99_union_init4.c:1.1 --- /dev/null Tue Jul 28 14:05:19 2015 +++ src/tests/usr.bin/xlint/lint1/d_c99_union_init4.c Tue Jul 28 14:05:19 2015 @@ -0,0 +1,15 @@ +/* test .data.l[x] */ +typedef struct { + int type; + union { + char b[20]; + short s[10]; + long l[5]; + } data; +} foo; + + +foo bar = { + .type = 3, + .data.l[0] = 4 +};