summaryrefslogtreecommitdiff
path: root/cfrontend
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-04-22 11:35:32 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-04-22 11:35:32 +0000
commitede425855bfd5cd4c13e3a11479a5e9d05acad58 (patch)
tree03cabf095bdfb829e409f49219c31e6d1fd108a5 /cfrontend
parent5029c5231cf840b84e60ccd1dd71fd32012e6251 (diff)
Labeled statements inside switch were incorrectly processed.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2211 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend')
-rw-r--r--cfrontend/C2C.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml
index 0ffbd66..e1b7705 100644
--- a/cfrontend/C2C.ml
+++ b/cfrontend/C2C.ml
@@ -618,6 +618,9 @@ let rec flattenSwitch = function
Label(Case e) :: flattenSwitch s1
| {sdesc = C.Slabeled(C.Sdefault, s1)} ->
Label Default :: flattenSwitch s1
+ | {sdesc = C.Slabeled(C.Slabel lbl, s1); sloc = loc} ->
+ Stmt {sdesc = C.Slabeled(C.Slabel lbl, Cutil.sskip); sloc = loc}
+ :: flattenSwitch s1
| s ->
[Stmt s]