C back-end: yet another fix for array literals

This commit is contained in:
Adrien Guatto 2010-07-08 12:49:14 +02:00
parent 7918332353
commit 3698105ccf

View file

@ -217,7 +217,7 @@ and pp_cexpr fmt ce = match ce with
| Cstructlit (s, el) ->
fprintf fmt "(%s){@[%a@]}" s (pp_list1 pp_cexpr ",") el
| Carraylit el ->
fprintf fmt "((int *){@[%a@]})" (pp_list1 pp_cexpr ",") el (* WRONG *)
fprintf fmt "((int []){@[%a@]})" (pp_list1 pp_cexpr ",") el (* WRONG *)
and pp_clhs fmt lhs = match lhs with
| Cvar s -> fprintf fmt "%s" s
| Cderef lhs' -> fprintf fmt "*%a" pp_clhs lhs'