diff options
| -rw-r--r-- | validation/typedef-redef-c89.c | 13 | ||||
| -rw-r--r-- | validation/typedef-redef.c | 14 |
2 files changed, 27 insertions, 0 deletions
diff --git a/validation/typedef-redef-c89.c b/validation/typedef-redef-c89.c new file mode 100644 index 00000000..6d4dc28c --- /dev/null +++ b/validation/typedef-redef-c89.c @@ -0,0 +1,13 @@ +typedef int int_t; +typedef int int_t; + +/* + * check-name: typedef-redef-c89 + * check-command: sparse -std=c89 --pedantic $file + * check-known-to-fail + * + * check-error-start +typedef-redef-c89.c:2:13: warning: redefinition of typedef 'int_t' +typedef-redef-c89.c:1:13: info: originally defined here + * check-error-end + */ diff --git a/validation/typedef-redef.c b/validation/typedef-redef.c new file mode 100644 index 00000000..b719ff9a --- /dev/null +++ b/validation/typedef-redef.c @@ -0,0 +1,14 @@ +typedef int ok_t; +typedef int ok_t; + +typedef int ko_t; +typedef long ko_t; + +/* + * check-name: typedef-redef + * check-known-to-fail + * + * check-error-start +typedef-redef.c:5:14: error: symbol 'ko_t' redeclared with different type (originally declared at typedef-redef.c:4) - different type sizes + * check-error-end + */ |
