aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/SimplExpr.v
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-21 17:00:43 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-21 17:00:43 +0000
commit1cd385f3b354a78ae8d02333f40cd065073c9b19 (patch)
tree923e490d77d414280d91918bcf5c35b93df78ab0 /cfrontend/SimplExpr.v
parent1c768ee3ff91e826f52cf08e1aaa8c4d637240f5 (diff)
downloadcompcert-kvx-1cd385f3b354a78ae8d02333f40cd065073c9b19.tar.gz
compcert-kvx-1cd385f3b354a78ae8d02333f40cd065073c9b19.zip
Support "default" cases in the middle of a "switch", not just at the end.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2383 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/SimplExpr.v')
-rw-r--r--cfrontend/SimplExpr.v9
1 files changed, 4 insertions, 5 deletions
diff --git a/cfrontend/SimplExpr.v b/cfrontend/SimplExpr.v
index 854d345a..1ead0aeb 100644
--- a/cfrontend/SimplExpr.v
+++ b/cfrontend/SimplExpr.v
@@ -488,13 +488,12 @@ Fixpoint transl_stmt (s: Csyntax.statement) : mon statement :=
with transl_lblstmt (ls: Csyntax.labeled_statements) : mon labeled_statements :=
match ls with
- | Csyntax.LSdefault s =>
- do ts <- transl_stmt s;
- ret (LSdefault ts)
- | Csyntax.LScase n s ls1 =>
+ | Csyntax.LSnil =>
+ ret LSnil
+ | Csyntax.LScons c s ls1 =>
do ts <- transl_stmt s;
do tls1 <- transl_lblstmt ls1;
- ret (LScase n ts tls1)
+ ret (LScons c ts tls1)
end.
(** Translation of a function *)