summaryrefslogtreecommitdiff
path: root/cparser/Cleanup.ml
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-08-21 13:23:30 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-08-21 13:23:30 +0000
commitc46b574d5b21fb2728c76c5cab1c46890c0fb1cd (patch)
tree0ae850f934ef634eaa6cda9c294f0bdd055cb1c1 /cparser/Cleanup.ml
parente499b023510259cc96be2093784b08cf090941d2 (diff)
Support C99 compound literals (by expansion in Unblock pass).
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2615 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cparser/Cleanup.ml')
-rw-r--r--cparser/Cleanup.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/cparser/Cleanup.ml b/cparser/Cleanup.ml
index 09595a1..09eaff9 100644
--- a/cparser/Cleanup.ml
+++ b/cparser/Cleanup.ml
@@ -65,9 +65,10 @@ let rec add_exp e =
| EBinop(op, e1, e2, ty) -> add_exp e1; add_exp e2
| EConditional(e1, e2, e3) -> add_exp e1; add_exp e2; add_exp e3
| ECast(ty, e1) -> add_typ ty; add_exp e1
+ | ECompound(ty, ie) -> add_typ ty; add_init ie
| ECall(e1, el) -> add_exp e1; List.iter add_exp el
-let rec add_init = function
+and add_init = function
| Init_single e -> add_exp e
| Init_array il -> List.iter add_init il
| Init_struct(id, il) -> addref id; List.iter (fun (_, i) -> add_init i) il