diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-08-21 13:23:30 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-08-21 13:23:30 +0000 |
commit | c46b574d5b21fb2728c76c5cab1c46890c0fb1cd (patch) | |
tree | 0ae850f934ef634eaa6cda9c294f0bdd055cb1c1 /cparser/StructReturn.ml | |
parent | e499b023510259cc96be2093784b08cf090941d2 (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/StructReturn.ml')
-rw-r--r-- | cparser/StructReturn.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cparser/StructReturn.ml b/cparser/StructReturn.ml index e13b09d..228cc53 100644 --- a/cparser/StructReturn.ml +++ b/cparser/StructReturn.ml @@ -113,6 +113,8 @@ let rec transf_expr env ctx e = etyp = newty} | ECast(ty, e1) -> {edesc = ECast(transf_type env ty, transf_expr env Val e1); etyp = newty} + | ECompound(ty, ie) -> + {edesc = ECompound(transf_type env ty, transf_init env ie); etyp = newty} | ECall(fn, args) -> transf_call env ctx None fn args e.etyp @@ -176,7 +178,7 @@ and transf_call env ctx opt_lhs fn args ty = (* Initializers *) -let rec transf_init env = function +and transf_init env = function | Init_single e -> Init_single (transf_expr env Val e) | Init_array il -> |