aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorOleg Nesterov <oleg@redhat.com>2020-03-12 16:09:09 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-03-15 23:25:15 +0100
commit0e3729b3edb8d3f384c907127f664e38bd7adab8 (patch)
tree68669727132a336d45ba0fd2c4158969f2428907 /validation
parentbc544c461c14915c55b2dd240dd5d15df4f4d8ea (diff)
downloadsparse-dev-0e3729b3edb8d3f384c907127f664e38bd7adab8.tar.gz
make "directive in macro's argument list" a warning
The presence of preprocessor directives within the arguments of a macro invocation is Undefined Behaviour [6.10.3p11]. Sparse issues an error for this but most often the result is well defined and is not a problem, processing can continue (for example, when the directive is one of the conditional ones). So, downgrade this sparse_error() to warning() (especially because issuing an error message can hide those coming later). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/preprocessor/preprocessor22.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/validation/preprocessor/preprocessor22.c b/validation/preprocessor/preprocessor22.c
index fb28daaa..277334c6 100644
--- a/validation/preprocessor/preprocessor22.c
+++ b/validation/preprocessor/preprocessor22.c
@@ -20,10 +20,10 @@ define_struct(a, {
* check-command: sparse -E $file
*
* check-error-start
-preprocessor/preprocessor22.c:6:1: error: directive in macro's argument list
-preprocessor/preprocessor22.c:8:1: error: directive in macro's argument list
-preprocessor/preprocessor22.c:10:1: error: directive in macro's argument list
-preprocessor/preprocessor22.c:12:1: error: directive in macro's argument list
+preprocessor/preprocessor22.c:6:1: warning: directive in macro's argument list
+preprocessor/preprocessor22.c:8:1: warning: directive in macro's argument list
+preprocessor/preprocessor22.c:10:1: warning: directive in macro's argument list
+preprocessor/preprocessor22.c:12:1: warning: directive in macro's argument list
* check-error-end
*
* check-output-start