diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-04-26 22:45:06 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-05-21 17:27:45 +0200 |
| commit | 33319e351c2874ca7c187bd96e7d986794fd2b41 (patch) | |
| tree | 71ee3a0ad9fb31d392bae256839743c286ac27db /validation | |
| parent | 177f5fe2255e2fd16040c802a7298ec21a29bd80 (diff) | |
| download | sparse-dev-33319e351c2874ca7c187bd96e7d986794fd2b41.tar.gz | |
bad-goto: jumping inside a statement expression is an error
It's invalid to jump inside a statement expression.
So, detect such jumps, issue an error message and mark the
function as useless for linearization since the resulting IR
would be invalid.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/label-scope2.c | 1 | ||||
| -rw-r--r-- | validation/label-stmt-expr0.c | 1 | ||||
| -rw-r--r-- | validation/label-stmt-expr1.c | 1 | ||||
| -rw-r--r-- | validation/label-stmt-expr2.c | 1 | ||||
| -rw-r--r-- | validation/linear/goto-stmt-expr-conditional.c | 1 | ||||
| -rw-r--r-- | validation/linear/goto-stmt-expr-short-circuit.c | 1 |
6 files changed, 0 insertions, 6 deletions
diff --git a/validation/label-scope2.c b/validation/label-scope2.c index 8c04ac65..44864752 100644 --- a/validation/label-scope2.c +++ b/validation/label-scope2.c @@ -23,7 +23,6 @@ a: /* * check-name: label-scope2 - * check-known-to-fail * * check-error-start label-scope2.c:20:17: error: label 'a' used outside statement expression diff --git a/validation/label-stmt-expr0.c b/validation/label-stmt-expr0.c index 66a64902..5fc452ab 100644 --- a/validation/label-stmt-expr0.c +++ b/validation/label-stmt-expr0.c @@ -26,7 +26,6 @@ l: 1; /* * check-name: label-stmt-expr0 * check-command: sparse -Wno-decl $file - * check-known-to-fail * * check-error-start label-stmt-expr0.c:6:9: error: label 'l' used outside statement expression diff --git a/validation/label-stmt-expr1.c b/validation/label-stmt-expr1.c index 339217dc..32a89aad 100644 --- a/validation/label-stmt-expr1.c +++ b/validation/label-stmt-expr1.c @@ -18,7 +18,6 @@ l: /* * check-name: label-stmt-expr1 - * check-known-to-fail * * check-error-start label-stmt-expr1.c:3:9: error: label 'l' used outside statement expression diff --git a/validation/label-stmt-expr2.c b/validation/label-stmt-expr2.c index 7a38e379..8c54477a 100644 --- a/validation/label-stmt-expr2.c +++ b/validation/label-stmt-expr2.c @@ -30,7 +30,6 @@ l: /* * check-name: label-stmt-expr2 - * check-known-to-fail * * check-error-start label-stmt-expr2.c:3:9: error: label 'l' used outside statement expression diff --git a/validation/linear/goto-stmt-expr-conditional.c b/validation/linear/goto-stmt-expr-conditional.c index 6576052b..bbfcb3eb 100644 --- a/validation/linear/goto-stmt-expr-conditional.c +++ b/validation/linear/goto-stmt-expr-conditional.c @@ -20,7 +20,6 @@ a: /* * check-name: goto-stmt-expr-conditional * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-error-ignore * check-output-ignore diff --git a/validation/linear/goto-stmt-expr-short-circuit.c b/validation/linear/goto-stmt-expr-short-circuit.c index 426315e6..a5953e73 100644 --- a/validation/linear/goto-stmt-expr-short-circuit.c +++ b/validation/linear/goto-stmt-expr-short-circuit.c @@ -24,7 +24,6 @@ inside: /* * check-name: goto-stmt-expr-short-circuit * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-error-ignore * check-output-ignore |
