From 96054a67b69d7d3db07507a927403e68007197ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Tue, 24 May 2011 11:02:51 +0200 Subject: [PATCH] Correct order for indices in array declaration In C, the order in the declaration of variables is the same as for access --- compiler/obc/c/c.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/obc/c/c.ml b/compiler/obc/c/c.ml index 05b493a..06bab9f 100644 --- a/compiler/obc/c/c.ml +++ b/compiler/obc/c/c.ml @@ -182,7 +182,7 @@ let rec pp_array_decl cty = match cty with | Cty_arr(n, cty') -> let ty, s = pp_array_decl cty' in - ty, sprintf "%s[%d]" s n + ty, sprintf "[%d]%s" n s | _ -> cty, "" let rec pp_param_cty fmt = function