diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-06-18 22:19:17 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-06-18 22:19:17 +0200 |
| commit | fdbb6dbe1d394dfae5a0d9c6d1c550c07678bf16 (patch) | |
| tree | acbc13056152f4e770e9f8f5a93a66c597b0f7e6 /validation | |
| parent | c290ad8ed9bce2634231af82b62e1589ff4b0e57 (diff) | |
| parent | 05e59dea673e07ab9a5ef98946d57857bf335c26 (diff) | |
| download | sparse-dev-fdbb6dbe1d394dfae5a0d9c6d1c550c07678bf16.tar.gz | |
Merge branch 'genmacro'
* support for builtin macros with arguments
* support for __has_feature() & __has_extension()
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/preprocessor/has-feature.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/validation/preprocessor/has-feature.c b/validation/preprocessor/has-feature.c new file mode 100644 index 00000000..e0f2e7f6 --- /dev/null +++ b/validation/preprocessor/has-feature.c @@ -0,0 +1,20 @@ +#ifndef __has_feature +__has_feature()??? Quesako? +#define __has_feature(x) 0 +#else +"has __has_feature(), yeah!" +#endif + +#if __has_feature(not_a_feature) +#error "not a feature!" +#endif + +/* + * check-name: has-feature + * check-command: sparse -E $file + * + * check-output-start + +"has __has_feature(), yeah!" + * check-output-end + */ |
