aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlexey Gladkov <gladkov.alexey@gmail.com>2020-07-28 20:35:07 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-07-29 00:24:19 +0200
commitee4aea9a9b097bc0b99346a697d8a09e7f373af6 (patch)
treeb979eb425445268345520e0f9afd7bb080f604d5
parent26b99f23652e4dd639ab6ea4f3a891c4fd752446 (diff)
downloadsparse-ee4aea9a9b097bc0b99346a697d8a09e7f373af6.tar.gz
dissect: add support for _Generic
Just suppress the warning about unknown type. Before: $ ./test-dissect validation/generic-functions.c FILE: validation/generic-functions.c 13:1 def f testf void ( ... ) 13:1 testf def . v a float validation/generic-functions.c:13:1: warning: bad expr->type: 31 13:1 testf -r- . v a float 14:1 def f testd void ( ... ) 14:1 testd def . v a double validation/generic-functions.c:14:1: warning: bad expr->type: 31 14:1 testd -r- . v a double 15:1 def f testl void ( ... ) 15:1 testl def . v a long double validation/generic-functions.c:15:1: warning: bad expr->type: 31 15:1 testl -r- . v a long double After: $ ./test-dissect validation/generic-functions.c FILE: validation/generic-functions.c 13:1 def f testf void ( ... ) 13:1 testf def . v a float 13:1 testf -r- . v a float 14:1 def f testd void ( ... ) 14:1 testd def . v a double 14:1 testd -r- . v a double 15:1 def f testl void ( ... ) 15:1 testl def . v a long double 15:1 testl -r- . v a long double Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--dissect.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dissect.c b/dissect.c
index 1970e46f..a633c8bf 100644
--- a/dissect.c
+++ b/dissect.c
@@ -342,6 +342,7 @@ again:
case EXPR_TYPE: // [struct T]; Why ???
case EXPR_VALUE:
case EXPR_FVALUE:
+ case EXPR_GENERIC:
break; case EXPR_LABEL:
ret = &label_ctype;