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/PackedStructs.ml | |
parent | e499b023510259cc96be2093784b08cf090941d2 (diff) | |
download | compcert-c46b574d5b21fb2728c76c5cab1c46890c0fb1cd.tar.gz compcert-c46b574d5b21fb2728c76c5cab1c46890c0fb1cd.zip |
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/PackedStructs.ml')
-rw-r--r-- | cparser/PackedStructs.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cparser/PackedStructs.ml b/cparser/PackedStructs.ml index 41c00ba8..3064e78d 100644 --- a/cparser/PackedStructs.ml +++ b/cparser/PackedStructs.ml @@ -15,6 +15,9 @@ (* Emulation of #pragma pack (experimental) *) +(* Assumes: unblocked code. + Preserves: unblocked code. *) + open Printf open Machine open C @@ -303,6 +306,9 @@ let transf_expr loc env ctx e = | ECast(ty, e1) -> {edesc = ECast(ty, texp Val e1); etyp = e.etyp} + | ECompound _ -> + assert false (* does not occur in unblocked code *) + | ECall(e1, el) -> {edesc = ECall(texp Val e1, List.map (texp Val) el); etyp = e.etyp} |