diff options
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/implicit-KR-arg-type1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/validation/implicit-KR-arg-type1.c b/validation/implicit-KR-arg-type1.c new file mode 100644 index 00000000..fe199ef5 --- /dev/null +++ b/validation/implicit-KR-arg-type1.c @@ -0,0 +1,16 @@ +int foo(a, b) + int a; +{ + if (b) + return a; +} + +/* + * check-name: implicit-KR-arg-type1 + * check-command: sparse -Wold-style-definition -Wimplicit-int $file + * + * check-error-start +implicit-KR-arg-type1.c:2:9: warning: non-ANSI definition of function 'foo' +implicit-KR-arg-type1.c:1:12: error: missing type declaration for parameter 'b' + * check-error-end + */ |
