diff options
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/Wunknown-attribute-def.c | 9 | ||||
| -rw-r--r-- | validation/Wunknown-attribute-no.c | 9 | ||||
| -rw-r--r-- | validation/Wunknown-attribute-yes.c | 10 |
3 files changed, 28 insertions, 0 deletions
diff --git a/validation/Wunknown-attribute-def.c b/validation/Wunknown-attribute-def.c new file mode 100644 index 00000000..0c0868d6 --- /dev/null +++ b/validation/Wunknown-attribute-def.c @@ -0,0 +1,9 @@ +static int foo(void) __attribute__((unknown_attribute)); + +/* + * check-name: warn-unknown-attribute + * + * check-error-start +Wunknown-attribute-def.c:1:37: warning: attribute 'unknown_attribute': unknown attribute + * check-error-end + */ diff --git a/validation/Wunknown-attribute-no.c b/validation/Wunknown-attribute-no.c new file mode 100644 index 00000000..87951699 --- /dev/null +++ b/validation/Wunknown-attribute-no.c @@ -0,0 +1,9 @@ +static int foo(void) __attribute__((unknown_attribute)); + +/* + * check-name: warn-unknown-attribute-no + * check-command: sparse -Wno-unknown-attribute $file + * + * check-error-start + * check-error-end + */ diff --git a/validation/Wunknown-attribute-yes.c b/validation/Wunknown-attribute-yes.c new file mode 100644 index 00000000..72538cf5 --- /dev/null +++ b/validation/Wunknown-attribute-yes.c @@ -0,0 +1,10 @@ +static int foo(void) __attribute__((unknown_attribute)); + +/* + * check-name: warn-unknown-attribute-yes + * check-command: sparse -Wunknown-attribute $file + * + * check-error-start +Wunknown-attribute-yes.c:1:37: warning: attribute 'unknown_attribute': unknown attribute + * check-error-end + */ |
