aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/Cshmgen.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/Cshmgen.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/Cshmgen.v')
-rw-r--r--cfrontend/Cshmgen.v9
1 files changed, 4 insertions, 5 deletions
diff --git a/cfrontend/Cshmgen.v b/cfrontend/Cshmgen.v
index f37e8c77..0ed008f3 100644
--- a/cfrontend/Cshmgen.v
+++ b/cfrontend/Cshmgen.v
@@ -534,13 +534,12 @@ with transl_lbl_stmt (tyret: type) (nbrk ncnt: nat)
(sl: Clight.labeled_statements)
{struct sl}: res lbl_stmt :=
match sl with
- | Clight.LSdefault s =>
- do ts <- transl_statement tyret nbrk ncnt s;
- OK (LSdefault ts)
- | Clight.LScase n s sl' =>
+ | Clight.LSnil =>
+ OK LSnil
+ | Clight.LScons n s sl' =>
do ts <- transl_statement tyret nbrk ncnt s;
do tsl' <- transl_lbl_stmt tyret nbrk ncnt sl';
- OK (LScase n ts tsl')
+ OK (LScons n ts tsl')
end.
(*** Translation of functions *)