summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-16 07:50:14 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-16 07:50:14 +0000
commit807d49a50b126bd1013de110128cfe2ac22f02dc (patch)
treef5833f881de65a602596fb68894735b91bf7eb17
parent1f7ded3c5c6e90133e43bc198157a310a01cc4f2 (diff)
"->" can be applied to an array, not just a pointer.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2251 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
-rw-r--r--cfrontend/C2C.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml
index e1b7705..34cb27a 100644
--- a/cfrontend/C2C.ml
+++ b/cfrontend/C2C.ml
@@ -588,7 +588,7 @@ and convertLvalue env e =
let e1' = convertExpr env e1 in
let ty1 =
match typeof e1' with
- | Tpointer(t, _) -> t
+ | Tpointer(t, _) | Tarray(t, _, _) -> t
| _ -> error ("wrong type for ->" ^ id ^ " access"); Tvoid in
Efield(Evalof(Ederef(e1', ty1), ty1), intern_string id, ty)
| C.EBinop(C.Oindex, e1, e2, _) ->