summaryrefslogtreecommitdiff
path: root/cfrontend/Csyntax.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-21 17:00:43 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-21 17:00:43 +0000
commit1cd385f3b354a78ae8d02333f40cd065073c9b19 (patch)
tree923e490d77d414280d91918bcf5c35b93df78ab0 /cfrontend/Csyntax.v
parent1c768ee3ff91e826f52cf08e1aaa8c4d637240f5 (diff)
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/Csyntax.v')
-rw-r--r--cfrontend/Csyntax.v6
1 files changed, 3 insertions, 3 deletions
diff --git a/cfrontend/Csyntax.v b/cfrontend/Csyntax.v
index 6c333aa..8b98556 100644
--- a/cfrontend/Csyntax.v
+++ b/cfrontend/Csyntax.v
@@ -165,9 +165,9 @@ Inductive statement : Type :=
| Sgoto : label -> statement
with labeled_statements : Type := (**r cases of a [switch] *)
- | LSdefault: statement -> labeled_statements
- | LScase: int -> statement -> labeled_statements -> labeled_statements.
-
+ | LSnil: labeled_statements
+ | LScons: option int -> statement -> labeled_statements -> labeled_statements.
+ (**r [None] is [default], [Some x] is [case x] *)
(** ** Functions *)
(** A function definition is composed of its return type ([fn_return]),