From c677f108ff340c5bca67b428aa6e56b47f62da8c Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 28 Mar 2014 08:20:14 +0000 Subject: C: Support array initializers that are too short + default init for remainder. Elab: Handle C99 designated initializers. C2C, Initializers: more precise intermediate AST for initializers. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2439 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cparser/Cprint.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Cprint.ml') diff --git a/cparser/Cprint.ml b/cparser/Cprint.ml index 0bbea683..f26025e9 100644 --- a/cparser/Cprint.ml +++ b/cparser/Cprint.ml @@ -342,7 +342,7 @@ let rec init pp = function List.iter (fun (fld, i) -> fprintf pp "%a,@ " init i) il; fprintf pp "}@]" | Init_union(id, fld, i) -> - fprintf pp "@[{%a}@]" init i + fprintf pp "@[{.%s =@ %a}@]" fld.fld_name init i let simple_decl pp (id, ty) = dcl pp ty (fun pp -> fprintf pp " %a" ident id) -- cgit