diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-03-11 23:47:49 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-27 17:51:40 +0200 |
| commit | 0062618881aa58f885ac78dc20c6fd2823c751b0 (patch) | |
| tree | 5a15d7ebca63367cc623dfd25ad3aaa4edf4da5c /validation | |
| parent | f5f2d7167eb6da02197f0e18cf512bfefb603385 (diff) | |
| download | sparse-dev-0062618881aa58f885ac78dc20c6fd2823c751b0.tar.gz | |
vla-sizeof: add support for sizeof of VLAs
While sparse can parse VLA, their size were left as
'undeterminated' (-1) and trying to use sizeof on VLAs
resulted in a warning 'error: cannot size the expression'.
Fix this by adding the needing code to evaluate the expressions
corresponding to the sizeof of VLAs.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/vla-sizeof-ice.c | 1 | ||||
| -rw-r--r-- | validation/vla-sizeof1.c | 1 | ||||
| -rw-r--r-- | validation/vla-sizeof2.c | 1 | ||||
| -rw-r--r-- | validation/vla-sizeof3.c | 1 | ||||
| -rw-r--r-- | validation/vla-sizeof4.c | 1 |
5 files changed, 0 insertions, 5 deletions
diff --git a/validation/vla-sizeof-ice.c b/validation/vla-sizeof-ice.c index 056b6ed7..472da6a4 100644 --- a/validation/vla-sizeof-ice.c +++ b/validation/vla-sizeof-ice.c @@ -16,5 +16,4 @@ static void test(int n) /* * check-name: vla-sizeof-ice * check-command: sparse -Wno-vla $file - * check-known-to-fail */ diff --git a/validation/vla-sizeof1.c b/validation/vla-sizeof1.c index f0e32b7c..ed7f5d4e 100644 --- a/validation/vla-sizeof1.c +++ b/validation/vla-sizeof1.c @@ -11,7 +11,6 @@ static unsigned int foo(int x) /* * check-name: vla-sizeof var,cte * check-command: test-linearize -Wvla $file - * check-known-to-fail * * check-output-ignore * check-output-contains: ret\\.32 *\\$1 diff --git a/validation/vla-sizeof2.c b/validation/vla-sizeof2.c index b0b79a03..57927d16 100644 --- a/validation/vla-sizeof2.c +++ b/validation/vla-sizeof2.c @@ -11,7 +11,6 @@ static unsigned long foo(int x) /* * check-name: vla-sizeof var * check-command: test-linearize -Wvla $file - * check-known-to-fail * * check-output-ignore * check-output-contains: ret\\..*\\$1 diff --git a/validation/vla-sizeof3.c b/validation/vla-sizeof3.c index b9cb6acc..21edb007 100644 --- a/validation/vla-sizeof3.c +++ b/validation/vla-sizeof3.c @@ -11,7 +11,6 @@ static unsigned long foo(int x) /* * check-name: vla-sizeof var X cte * check-command: test-linearize -Wvla $file - * check-known-to-fail * * check-output-ignore * check-output-contains: ret\\..*\\$1 diff --git a/validation/vla-sizeof4.c b/validation/vla-sizeof4.c index 4b50fb2c..e7478613 100644 --- a/validation/vla-sizeof4.c +++ b/validation/vla-sizeof4.c @@ -11,7 +11,6 @@ static unsigned long foo(int x, int y) /* * check-name: vla-sizeof var X var * check-command: test-linearize -Wvla $file - * check-known-to-fail * * check-output-ignore * check-output-contains: ret\\..*\\$1 |
