aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-04-26 22:45:06 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-05-21 17:27:45 +0200
commit33319e351c2874ca7c187bd96e7d986794fd2b41 (patch)
tree71ee3a0ad9fb31d392bae256839743c286ac27db /validation/linear
parent177f5fe2255e2fd16040c802a7298ec21a29bd80 (diff)
downloadsparse-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/linear')
-rw-r--r--validation/linear/goto-stmt-expr-conditional.c1
-rw-r--r--validation/linear/goto-stmt-expr-short-circuit.c1
2 files changed, 0 insertions, 2 deletions
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