aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/preprocessor
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-12-13 11:36:04 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-12-13 12:01:52 +0100
commit7f1011b311e9329f53d73f88de495ea64071eb77 (patch)
tree74563d6c789fd9564879133524e5e35d0d1df372 /validation/preprocessor
parent35d5258088461b392719433852f54ef28242c2d7 (diff)
downloadsparse-dev-7f1011b311e9329f53d73f88de495ea64071eb77.tar.gz
fix: accept 'sparse -D M...'
Till now, sparse was unneedlessly strict in what it accepted in '-D' options. More specifically, it doesn't accept: 1) separated '-D' and the macro definition, like: sparse -D MACRO[=definition] ... 2) a space between the '-D' and the macro name, like: sparse '-D MACRO[=definition] ... Case 1) is clearly accepted by GCC, clang and should be accepted for a POSIX's c99. Case 2's status is less clear but is also accepted by GCC and clang (leaving any validation to the corresponding internal #define). Fix this by accepting separated command line argument for '-D' and the macro (and removing the check that rejected the macro part if it started with a space). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/preprocessor')
-rw-r--r--validation/preprocessor/cli-D-arg.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/preprocessor/cli-D-arg.c b/validation/preprocessor/cli-D-arg.c
index b098e98b..03c5bac3 100644
--- a/validation/preprocessor/cli-D-arg.c
+++ b/validation/preprocessor/cli-D-arg.c
@@ -3,7 +3,6 @@ B
/*
* check-name: cli: -D MACRO
* check-command: sparse -E -D A -D B=abc $file
- * check-known-to-fail
*
* check-output-start