diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-01-05 04:22:17 +0100 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2017-02-13 09:34:45 +0800 |
| commit | 8c8c6f82ff625a97f26c14f230518fc32ad4c0c7 (patch) | |
| tree | fe40a492194b170422d32a06e61cd624cf69b33a /validation | |
| parent | 2a67f7fb593572c8c58a58e8e8d69f73ba65387f (diff) | |
| download | sparse-dev-8c8c6f82ff625a97f26c14f230518fc32ad4c0c7.tar.gz | |
C11: teach sparse about '_Noreturn'
This is mainly a new name for GCC's 'noreturn' attribute but defined
as a new function specifier.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/c11-noreturn.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/validation/c11-noreturn.c b/validation/c11-noreturn.c new file mode 100644 index 00000000..bc20de82 --- /dev/null +++ b/validation/c11-noreturn.c @@ -0,0 +1,9 @@ +static _Noreturn void foo(void) { while (1) ; } + +/* + * check-name: c11-noreturn + * check-command: test-parsing -std=c11 $file + * + * check-output-ignore + * check-output-contains: \[noreturn\] + */ |
