diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-01-06 07:30:20 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-13 14:16:51 +0100 |
| commit | d768e0f674ed9b399ca274fe33a12057f27cd87d (patch) | |
| tree | 5ebab3592928315791bd84a09a2417a3bed79ee3 /validation/preprocessor | |
| parent | 1dfaa8e70adbaa420b8ad08311dfb05265b98c6a (diff) | |
| download | sparse-dev-d768e0f674ed9b399ca274fe33a12057f27cd87d.tar.gz | |
add test case for pre-processor extra tokens warning
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/preprocessor')
| -rw-r--r-- | validation/preprocessor/extra-token.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/preprocessor/extra-token.c b/validation/preprocessor/extra-token.c new file mode 100644 index 00000000..50a853c5 --- /dev/null +++ b/validation/preprocessor/extra-token.c @@ -0,0 +1,15 @@ +#define THIS 0 +#ifdef THIS == 1 +#endif + +/* + * check-name: preprocessor/extra-token.c + * check-command: sparse -E $file + * check-known-to-fail + * + * check-error-start +preprocessor/extra-token.c:2:13: warning: extra tokens at end of #ifdef directive + * check-error-end + * + * check-output-ignore + */ |
