aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
Diffstat (limited to 'validation')
-rw-r--r--validation/implicit-KR-arg-type0.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/implicit-KR-arg-type0.c b/validation/implicit-KR-arg-type0.c
new file mode 100644
index 00000000..f73d36ff
--- /dev/null
+++ b/validation/implicit-KR-arg-type0.c
@@ -0,0 +1,15 @@
+int foo(a, b)
+ int a;
+{
+ if (b)
+ return a;
+}
+
+/*
+ * check-name: implicit-KR-arg-type
+ * check-command: sparse -Wno-decl -Wold-style-definition -Wno-implicit-int $file
+ *
+ * check-error-start
+implicit-KR-arg-type0.c:2:9: warning: non-ANSI definition of function 'foo'
+ * check-error-end
+ */