Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 new c99 init test found by xorg's ...
details: https://anonhg.NetBSD.org/src/rev/a96fc3327a45
branches: trunk
changeset: 339562:a96fc3327a45
user: christos <christos%NetBSD.org@localhost>
date: Tue Jul 28 18:05:19 2015 +0000
description:
new c99 init test found by xorg's Iconify.c
diffstat:
tests/usr.bin/xlint/lint1/Makefile | 3 ++-
tests/usr.bin/xlint/lint1/d_c99_union_init4.c | 15 +++++++++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r e8ef39c955da -r a96fc3327a45 tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile Tue Jul 28 17:56:56 2015 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile Tue Jul 28 18:05:19 2015 +0000
@@ -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_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
diff -r e8ef39c955da -r a96fc3327a45 tests/usr.bin/xlint/lint1/d_c99_union_init4.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_union_init4.c Tue Jul 28 18:05:19 2015 +0000
@@ -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
+};
Home |
Main Index |
Thread Index |
Old Index