Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- validation/storage-struct-member.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 validation/storage-struct-member.c diff --git a/validation/storage-struct-member.c b/validation/storage-struct-member.c new file mode 100644 index 000000000..6bd958abc --- /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 + */ -- 2.14.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html