aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-06-19 15:02:19 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-06-20 23:38:19 +0200
commitad9670d0530c31d171103ac3ea60c8aba20f9a80 (patch)
tree33e7931923c687817dadc929297c8115694ee50a /validation
parent1d91e40cb10a82c69091f3bf2b91ffd9837d7725 (diff)
downloadsparse-dev-ad9670d0530c31d171103ac3ea60c8aba20f9a80.tar.gz
gensel: validate the type of the associations
The type in a generic association must correspond to a complete type and not a variably modified type. Add validation for this. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/generic-bad0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/validation/generic-bad0.c b/validation/generic-bad0.c
index acc3d5e7..d11030db 100644
--- a/validation/generic-bad0.c
+++ b/validation/generic-bad0.c
@@ -18,6 +18,10 @@ void foo(int n)
generic-bad0.c:5:33: warning: multiple default in generic expression
generic-bad0.c:5:30: note: previous was here
generic-bad0.c:6:25: warning: Variable length array is used.
+generic-bad0.c:6:21: error: variable length array type in generic selection
+generic-bad0.c:7:21: error: incomplete type in generic selection
+generic-bad0.c:8:21: error: incomplete type in generic selection
+generic-bad0.c:9:21: error: function type in generic selection
generic-bad0.c:11:17: error: no generic selection for 'int [addressable] n'
* check-error-end
*/