diff options
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/storage-struct-member.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/validation/storage-struct-member.c b/validation/storage-struct-member.c new file mode 100644 index 00000000..6bd958ab --- /dev/null +++ b/validation/storage-struct-member.c @@ -0,0 +1,20 @@ +int foo(a) + register int a; +{ + return a; +} + +struct s { + register int a; +}; + +/* + * check-name: storage in struct member + * check-command: sparse -Wno-decl $file + * + * check-known-to-fail + * check-error-start +storage-struct-member.c:2:9: warning: non-ANSI definition of function 'foo' +storage-struct-member.c:8:9: error: storage specifier in structure definition' + * check-error-end + */ |
