Module Name: src
Committed By: christos
Date: Wed Jul 1 15:36:44 UTC 2015
Modified Files:
src/tests/usr.bin/xlint/lint1: Makefile
Added Files:
src/tests/usr.bin/xlint/lint1: d_cast_fun_array_param.c
Log Message:
new test.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.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.7 src/tests/usr.bin/xlint/lint1/Makefile:1.8
--- src/tests/usr.bin/xlint/lint1/Makefile:1.7 Mon May 11 13:21:32 2015
+++ src/tests/usr.bin/xlint/lint1/Makefile Wed Jul 1 11:36:44 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2015/05/11 17:21:32 christos Exp $
+# $NetBSD: Makefile,v 1.8 2015/07/01 15:36:44 christos Exp $
NOMAN= # defined
@@ -27,6 +27,7 @@ FILES+= d_c99_union_init2.c
FILES+= d_c99_union_init3.c
FILES+= d_c9x_array_init.c
FILES+= d_c9x_recursive_init.c
+FILES+= d_cast_fun_array_param.c
FILES+= d_cast_init.c
FILES+= d_cast_init2.c
FILES+= d_cast_lhs.c
Added files:
Index: src/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c:1.1
--- /dev/null Wed Jul 1 11:36:44 2015
+++ src/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c Wed Jul 1 11:36:44 2015
@@ -0,0 +1,9 @@
+
+static void f(void *b[4]) {
+ (void)&b;
+}
+
+void *
+foo(void *fn) {
+ return fn == 0 ? f : (void (*)(void *[4])) fn;
+}