From 1cd385f3b354a78ae8d02333f40cd065073c9b19 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sat, 21 Dec 2013 17:00:43 +0000 Subject: 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 --- cfrontend/Csyntax.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cfrontend/Csyntax.v') 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]), -- cgit