From 807d49a50b126bd1013de110128cfe2ac22f02dc Mon Sep 17 00:00:00 2001 From: xleroy Date: Thu, 16 May 2013 07:50:14 +0000 Subject: "->" 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 --- cfrontend/C2C.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cfrontend') 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, _) -> -- cgit v1.2.3