diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-12-21 17:00:43 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-12-21 17:00:43 +0000 |
commit | 1cd385f3b354a78ae8d02333f40cd065073c9b19 (patch) | |
tree | 923e490d77d414280d91918bcf5c35b93df78ab0 /cfrontend/Csyntax.v | |
parent | 1c768ee3ff91e826f52cf08e1aaa8c4d637240f5 (diff) | |
download | compcert-1cd385f3b354a78ae8d02333f40cd065073c9b19.tar.gz compcert-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/Csyntax.v')
-rw-r--r-- | cfrontend/Csyntax.v | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cfrontend/Csyntax.v b/cfrontend/Csyntax.v index 6c333aac..8b98556b 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]), |